Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to create a measure with a specific behaviour.
Both cycles and time are a simple SUM, nothing else. Cycles (#/h) measure is define as seen below.
What I want a result is:
- If I have more than one Line selected (as the image) the total or subtotal should be 144.17 + 83.46 = 227.63
- If I have only one Line selected the total or subtotal should be either 144.17 or 83.46, depending on which is selected.
How can I achieve this?
Thank you.
Solved! Go to Solution.
Hi @afbraga66 ,
I suggest you to try code as below to create a measure.
Cycles (#/h) =
VAR _SUMMARIZE =
SUMMARIZE (
'TableName',
'TableName'[Line],
"Cycles", DIVIDE ( [Cycles (#)], [Time (h)] )
)
RETURN
SUMX ( _SUMMARIZE, [Cycles] )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @afbraga66 ,
I suggest you to try code as below to create a measure.
Cycles (#/h) =
VAR _SUMMARIZE =
SUMMARIZE (
'TableName',
'TableName'[Line],
"Cycles", DIVIDE ( [Cycles (#)], [Time (h)] )
)
RETURN
SUMX ( _SUMMARIZE, [Cycles] )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |