Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey everyone,
I created this DAX Measure which accomplished what I need when I only have one item selected in the filter however when I select all or multiple IDS, the count card cant display anything and throws out an error.
SAIDI_CIRCUIT =
CALCULATE
(DIVIDE (SUM(OUTAGE_SUMMARY[CUSTOMER_MINUTES]),[CKTAVGMETERCNT],0),
FILTER(OUTAGE_SUMMARY,OUTAGE_SUMMARY[NOTIFICATION_DESCRIPTION] = ALLSELECTED(OUTAGE_SUMMARY[NOTIFICATION_DESCRIPTION])))
Basically my calculation divides Customer Minutes by Avg Meter Count where I apply a filter to grab all values selected in notification description within my slicer.
My count card is only working and displaying when I select 1 circuit, if i select multiple circuits/ids it throws an error.
How can i build a DAX so I can see 1465.16 which is the sum of both outputs.
Circuit | Customer Mins | Avg Meter Cnt | Expected Output |
A | 726,540 | 908 | 800.15 |
B | 604,496 | 909 | 665.01 |
For example, right now this measure will be able to give individual numbers so if i select A, it will comfortably give me 800.15 howeber when i multiselect A and B, the visual doesnt show. My count card should show 800.15+665.01 = 1465.16 if i was to select both.
What am i missing in the dAX that it wont show the sum of multiple selections?
Solved! Go to Solution.
Hi,
Assuming Customer Mins and Avg Meter Cnt are measures, try these measures
Measure1 = IFERROR([Customer Mins]/[Avg Meter Cnt],BLANK())
Measure2 = SUMX(VALUES(Data[Circuit]),[Measure1])
Hope this helps.
@Anonymous you need to provide more detail, how your tables are connected, sample data and expected output especially the tables used in this measure.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi Parry,
Basically my calculation Divides Customer Minutes by Avg Meter Count. The result is below.
My count card is only displaying when I select 1 circuit, if i select multiple it throws an error.
How can i build a DAX so I can see
1465.16 |
which is the sum of both outputs.
Circuit | Customer Mins | Avg Meter Cnt | Expected Output |
A | 726,540 | 908 | 800.15 |
B | 604,496 | 909 | 665.01 |
Hi,
Assuming Customer Mins and Avg Meter Cnt are measures, try these measures
Measure1 = IFERROR([Customer Mins]/[Avg Meter Cnt],BLANK())
Measure2 = SUMX(VALUES(Data[Circuit]),[Measure1])
Hope this helps.
This worked like a charm! Thank you so much.
You are welcome.
Hey Ashish,
One thing I noticed is the performance of the report took a hit when I implemented the SUMX dax measure, is there another alternative to the dax? or way to optimize it? could calculate(sum() work the same?
Hi,
I am not sure of that. May be someone else can pitch in.
@nataliengarce try this measure
Avg = SUMX ( 'Table', DIVIDE ( 'Table'[Customer Mins], 'Table'[Avg Meter Cnt] ) )
Would appreciate Kudos 🙂 if my solution helped.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |