Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Have can I get this measure to only count Plant once ?
Highlighted butikker = COUNTX(HighlightGBS, IF([Highlight Valgte Muligheder] > 0, 1))-0Currently it gives me 14, but it should give me 13 because plant 1483 has two subdivisions present with a 1 each
The "Hightlight Valgte Muligheder" measure looks like this:
Highlight Valgte Muligheder =
VAR Valgte = IF(ISCROSSFILTERED('Highlight indhold'[Valgmuligheder]), COUNTA('Highlight indhold'[Valgmuligheder]), 0) -- currently not been used
VAR Opslag = VALUES('Highlight indhold'[Valgmuligheder])
VAR Business_Cases = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighlightGBS[HL - Business Cases])), 1, 0)
VAR Storbageri = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighlightGBS[HL - Storbageri])), 1, 0)
VAR Bageri = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighlightGBS[HL - Bageri])), 1, 0)
VAR Egen_Ren = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighlightGBS[HL - Egen Rengøring])), 1, 0)
VAR Resultat = Business_Cases + Storbageri + Bageri + Egen_Ren
VAR MultiResultat = IF(Resultat > 1 && CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[Helper] > 1), 1, 0)
RETURN
IF(HASONEFILTER('Highlight indhold'[Valgmuligheder]),Resultat,
IF(ISCROSSFILTERED('Highlight indhold'[Valgmuligheder]), MultiResultat, BLANK()))
Solved! Go to Solution.
Hi @DK-C-87 you can modify the measure:
Highlighted butikker =
CALCULATE(
COUNTROWS(
DISTINCT(HighlightGBS[Plant])
),
FILTER(HighlightGBS, [Highlight Valgte Muligheder] > 0)
)
I hope by using DISTINCT, the count for Plant 1483 will only appear once, giving you the correct result of 13 instead of 14.
Please check.
Proud to be a Super User! | |
Hi @DK-C-87 you can modify the measure:
Highlighted butikker =
CALCULATE(
COUNTROWS(
DISTINCT(HighlightGBS[Plant])
),
FILTER(HighlightGBS, [Highlight Valgte Muligheder] > 0)
)
I hope by using DISTINCT, the count for Plant 1483 will only appear once, giving you the correct result of 13 instead of 14.
Please check.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |