Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Im trying to get this
but i get this
here is my current code
Unfortunately I cant but I can give you a picture of the data
I have a Date Table that connects to Event Dates in my “Base” table that has unique responses by ID. Then that table connects to all the responses per unique id per question. And each unique ID is connected to a meta data table which connects to the category hierarchy. As shown below.
I then have some measures that calculate a score based on various answers to varies questions
TotalAgreementLevelScore =
….. VARS
VAR TotalAgreementLevelScore = CALCULATE(TotalAgreementLevelMultiplierCount/TotalAgreementLevelCount)
RETURN TotalAgreementLevelScore
Then I calculate the rank based on score by Category Hierarchy
VAR Region = ISINSCOPE(Station_Departure[xRegion_t])
VAR SubRegion = ISINSCOPE(Station_Departure[xSubRegion_t])
VAR Station = ISINSCOPE(Station_Departure[xStn_t])
VAR Result = SWITCH ( true(),
Region&&NOT(SubRegion)&&NOT(Station),CALCULATE( RANKX(ALLSELECTED(Station_Departure[xRegion_t]), [TotalAgreementLevelScore],,DESC)),
SubRegion&&NOT(Station)&&NOT(Region),CALCULATE( RANKX(ALLSELECTED(Station_Departure[xSubRegion_t]), [TotalAgreementLevelScore],,DESC)),
Station&&NOT(Region)&&NOT(SubRegion),CALCULATE (RANKX(ALLSELECTED(Station_Departure[xStn_t]), [TotalAgreementLevelScore],,DESC)))
RETURN Result
Then put the results into a matrix to show each category rank by time period and it does not work.
Also when I try to expand the rows I end up with no results for the sub categories
Check out the November 2025 Power BI 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!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 12 | |
| 10 | |
| 8 |