Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi!
I'd swear I just posted this question, but now I can't find it anywhere.
I have a table like this:
COMP ANSWER CHECKED
1 1 1
1 2 0
1 3 0
1 4 1
1 5 0
2 1 0
2 2 1
2 3 0
2 4 0
2 5 1
3 1 0
3 2 1
3 3 1
3 4 1
3 5 0
4 1 1
4 2 0
4 3 0
4 4 0
4 5 0
5 1 1
5 2 1
5 3 1
5 4 1
5 5 1
I need a measure that tells me the "mode" of how many "ANSWERS" have checked the column "COMP". For example, in this case:
COMP 1 has checked 2 answers
COMP 2 has checked 2 answers
COMP 3 has checked 3 answers
COMP 4 has checked 1 answer
COMP 5 has checked 5 answers
The most repeated case is that a COMP checks 2 answers, son I need the measure to return 2.
Is this possible?
Regards!
Hi,
Please check the below picture and the attached pbix file.
Expected result measure: =
VAR _newtable =
GROUPBY (
ADDCOLUMNS (
DISTINCT ( Data[COMP] ),
"@checkedcount", CALCULATE ( COUNTROWS ( Data ), Data[CHECKED] = 1 )
),
[@checkedcount],
"@countrows", SUMX ( CURRENTGROUP (), 1 )
)
VAR _maxcountrows =
MAXX ( _newtable, [@countrows] )
RETURN
_maxcountrows
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi! Thanks for your answer!
I don't think it does what I need, because if I change the checks (in the COMP 1 I set 3 checked instead of 2), the expected result should be 3, and in your pbix I still get 2.
Regards!
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
79 | |
61 | |
60 | |
58 |
User | Count |
---|---|
151 | |
113 | |
99 | |
80 | |
72 |