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.
Not sure if this is even possible.
My measure:
My 2 issues are:
1. if product 1 =0 and product 2 >0, I want to show product 2 at the row level, but not have it included in the total.
2. for the Usage % in the Total line, i want to include only those accounts that have Product 1 orders >0 and Product 2 orders >=0. (The calculation would be 40/95=42.1%)
Thanks in advance!
Hi @Reetz
in your screenshot line two changes from 12 to 40. I assume this is a typo.
You can use this dax to solve it:
usage % =
VAR _tmp =
DIVIDE (
SUMX ( someTable, IF ( someTable[Prod1] > 0, someTable[Prod2], 0 ) ) + 0,
SUMX ( someTable, IF ( someTable[Prod1] > 0, someTable[Prod1], 0 ) )
)
RETURN
IF ( ISBLANK ( _tmp ), "-", _tmp )
As for the product 2-column, this has to be converted to a measure to achieve the desired output:
Measure Prod 2 =
IF (
HASONEVALUE ( someTable[Prod2] ),
SUM ( someTable[Prod2] ),
CALCULATE (
SUM ( someTable[Prod2] ),
VAR _tmp =
CALCULATETABLE (
VALUES ( someTable[Act] ),
FILTER ( someTable, someTable[Prod2] > 0 && someTable[Prod1] > 0 )
)
RETURN
FILTER ( someTable, someTable[Act] IN _tmp )
)
)
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |