Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How do I create DAX that finds the percent of incidents that are Status=Closed based on row view
Sample data from Power Pivot.
Total Incidents = Count of CREATED_DATE
I tried following Measure both gave error
% Closed:=if(Table1[STATUS]="Closed",[Count of CREATED_DATE],0)/[Count of CREATED_DATE]
and
% Closed2:=DIVIDE(if(Table1[STATUS]="Closed",[Count of CREATED_DATE],0),[Count of CREATED_DATE],0)
Here is my table
Here is what I wish to create. Please note, the % of Closed Incidents to Total should change based on how I filter the power-pivot, i.e. if I filter to include ONLY closed incidents, then naturally the % should be 100%
Solved! Go to Solution.
@QQQ,
You can create the following measures in your table.
Total incidents = COUNT(Table[CREATE_DATE])
Count of closed = CALCULATE(COUNT(Table[CREATE_DATE]),FILTER(Table,Table[STATUS]="Closed"))
%closed = [Count of closed]/[Total incidents]
If you have questions about the DAX, please share raw data of your table that can be copied and pasted, I will test it in my environment.
Regards,
Lydia
@QQQ,
You can create the following measures in your table.
Total incidents = COUNT(Table[CREATE_DATE])
Count of closed = CALCULATE(COUNT(Table[CREATE_DATE]),FILTER(Table,Table[STATUS]="Closed"))
%closed = [Count of closed]/[Total incidents]
If you have questions about the DAX, please share raw data of your table that can be copied and pasted, I will test it in my environment.
Regards,
Lydia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |