Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Have can I get this measure to only count Plant once ?
Highlighted butikker = COUNTX(HighlightGBS, IF([Highlight Valgte Muligheder] > 0, 1))-0
Currently 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! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
72 | |
62 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
62 | |
59 | |
56 |