Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I need help with counting the number of times a measure appears in multiple columns.
In the image above you can see that for the Client 33, with various users, the most common number for MOD19 (19 Days in a Month) is 8,43.
What I want to know is how can I count the number of times 8,43 appears in MOD19, MOD 20, MOD21 and MOD 22.
And then 8,01 in MOD19, MOD 20, MOD21 and MOD 22.
7,63 in.... ETC
The answer should be something like this p.e.:
| no_PHC | MOD19 | MOD20 | MOD21 | MOD22 | C_MOD19 | C_MOD20 | C_MOD21 | C_MOD22 |
| 33 | 8,43 | 8,01 | 7,63 | 7,28 | 16 | 16 | 24 | 16 |
File PBI:
Here's the excel file that i'm trying to reproduce in PBI.
File Xlsx (Right values):
If it is easier in excel, i'll accept it. 😀
@Anonymous
Please share a sample or dummy PBI file with this information.
Save it in One Drive or Google Drive and share the link
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Anonymous ,
It is suggested to UnPivot the 4 "cen" columns like below:
Then create measures like so:
MOD =
MAXX (
TOPN (
1,
ADDCOLUMNS (
VALUES ( 'Face Value Test'[Value] ),
"Moda", CALCULATE ( COUNT ( 'Face Value Test'[Value] ) )
),
[Moda], 0
),
'Face Value Test'[Value]
)
Count_MOD_3 =
VAR MOD_ =
CALCULATE ( [MOD], ALL ( 'Face Value Test'[Value] ) )
VAR MaxMOD_ =
IF ( MAX ( 'Face Value Test'[Value] ) = MOD_, MOD_ )
RETURN
CALCULATE (
COUNT ( 'Face Value Test'[Value] ),
'Face Value Test'[Value] = MaxMOD_
)
Filter Measure =
IF (
MAX ( 'Face Value Test'[Value] )
= CALCULATE ( [MOD], ALL ( 'Face Value Test'[Value] ) ),
1
)
And you will get this:
Please check if the attachment is what you want.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much for your help. But it not correct.
I know what the right values are.
I'll add the excel file that does what i want to do in PBI.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!