Forum Discussion
Need Help Formatting Matrix Table
- 2 years ago
Hi PaulMac
You can manipulate what to show by the hierarchy level with "Isinscope" function.
Like :The pbix with the example is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- 2 years ago
Thanks for your swift reply Ritaf1983
I did however find a solution to my problem, I needed to elaborate the DAX and use the SUMMARIZE function in order for the Total to show correctly for me.
My DAX ended up looking like this:CountJobs_by_Volume = VAR countVol = CALCULATE( COUNTA(Usage[JobNumber]), FILTER( Usage, Usage[JobNumber] = SELECTEDVALUE(Jobs_Letters_and_DAS[JobNumber]) ) ) VAR totalVol = SUMX( SUMMARIZE( Jobs_Letters_and_DAS, Jobs_Letters_and_DAS[JobNumber], "JobCount", CALCULATE(COUNTA(Usage[JobNumber])) ), [JobCount] ) RETURN IF( ISINSCOPE(Jobs_Letters_and_DAS[Letter No]), BLANK(), IF( HASONEVALUE(Jobs_Letters_and_DAS[JobNumber]), countVol, totalVol ) )
Your help has been very much appreciated. 🙂
Hi PaulMac
You can manipulate what to show by the hierarchy level with "Isinscope" function.
Like :
The pbix with the example is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- PaulMac2 years agoHelper IV
Hi Ritaf1983
I have noticed that my Total row doesn't appear correct and is showing a much lower number than expected. I see on your example your Total appears un affected, can I ask how you achieved this?
Thanks
Paul- Ritaf19832 years agoSuper User
Hi PaulMac
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
- PaulMac2 years agoHelper IV
Thanks for your swift reply Ritaf1983
I did however find a solution to my problem, I needed to elaborate the DAX and use the SUMMARIZE function in order for the Total to show correctly for me.
My DAX ended up looking like this:CountJobs_by_Volume = VAR countVol = CALCULATE( COUNTA(Usage[JobNumber]), FILTER( Usage, Usage[JobNumber] = SELECTEDVALUE(Jobs_Letters_and_DAS[JobNumber]) ) ) VAR totalVol = SUMX( SUMMARIZE( Jobs_Letters_and_DAS, Jobs_Letters_and_DAS[JobNumber], "JobCount", CALCULATE(COUNTA(Usage[JobNumber])) ), [JobCount] ) RETURN IF( ISINSCOPE(Jobs_Letters_and_DAS[Letter No]), BLANK(), IF( HASONEVALUE(Jobs_Letters_and_DAS[JobNumber]), countVol, totalVol ) )
Your help has been very much appreciated. 🙂