Forum Discussion
Using RANKX, with a measure, and ISINSCOPE, within a matrix hierarchy
- 6 years ago
You read correctly that a CALCULATE() is needed there; however, when you reference a measure like that, it is automatically wrapped in one. If you were to write SUM(Table[Column1]), that would need to be wrapped in CALCULATE().
For your measure, to troubleshoot, do you get the expected result for region rank when you take driver out of the hierarchy? Or if you comment out your return with // and return your isdrivervisible and isregionvisible variables instead, you can help diagnose where the problem is.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
You read correctly that a CALCULATE() is needed there; however, when you reference a measure like that, it is automatically wrapped in one. If you were to write SUM(Table[Column1]), that would need to be wrapped in CALCULATE().
For your measure, to troubleshoot, do you get the expected result for region rank when you take driver out of the hierarchy? Or if you comment out your return with // and return your isdrivervisible and isregionvisible variables instead, you can help diagnose where the problem is.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Thank you for your help. I feel like an idiot though, lol.
I tried to isolate just the Region field earlier and I did not receive the expected result. However, I took your advice and tried to isolate it again, but this time I realized that I did not heed the warning I read from an earlier post... be careful of the effects from Page Filters with this calculation. I cleared the Page Filter and adjusted the formula to calculate with the condition of the Hours per Driver measure not being BLANK, and voila, I am now receiving the expected results.
Thank you for your assistance and time. I very much appreciate it.
Best,
MP
- mahoneypat6 years agoMicrosoft Employee
Glad it worked out. I did something like that even today.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat