Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have 3 columns in my data model:
* Location (string)
* Disposition Category/Time Frame (string)
* Quanity of reports (numeric)
I am trying to calculate the percentage of reports that are disposed within each time frame for each location. I have the number of reports for each category for each location (see attached matrix), but I am having trouble writing the Dax expression to calculate the disposition percentage because I need to omit specific disposition categories, and I am using the numeric value from a different column. The formula I am trying to replicate is below. Thank you!
Solved! Go to Solution.
Thank you, @Icey!
Yes, that is what my table looks like. I tried the both of the measures you sent, and I am not getting the same percentages. I have attached the below screenshot to show my updated matrix. Any help is greatly appreciated. Thank you!!
Marie
Hi @Anonymous ,
Is this your table like?
If so, you can create your measures like so:
percent A = IF ( CALCULATE ( SUM ( 'Table'[Quanity of reports] ), 'Table'[Disposition Category/Time Frame] <> "Pending From 155 to 301 days" ) > 9, DIVIDE ( CALCULATE ( SUM ( 'Table'[Quanity of reports] ), 'Table'[Disposition Category/Time Frame] = "Dispoesd Afer 301 days" ), CALCULATE ( SUM ( 'Table'[Quanity of reports] ), 'Table'[Disposition Category/Time Frame] <> "Pending From 155 to 301 days" ) ) )
Or,
Measure = IF ( CALCULATE ( SUM ( 'Table'[Quanity of reports] ), 'Table'[Disposition Category/Time Frame] <> "Pending From 155 to 301 days" ) > 9, DIVIDE ( SUMX ( FILTER ( 'Table', 'Table'[Disposition Category/Time Frame] <> "Pending From 155 to 301 days" ), 'Table'[Quanity of reports] ), CALCULATE ( SUM ( 'Table'[Quanity of reports] ), 'Table'[Disposition Category/Time Frame] <> "Pending From 155 to 301 days" ) ) )
If I have any misunderstandings, please let me know.
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, @Icey!
Yes, that is what my table looks like. I tried the both of the measures you sent, and I am not getting the same percentages. I have attached the below screenshot to show my updated matrix. Any help is greatly appreciated. Thank you!!
Marie
Thank you so much!! I got it to work!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |