The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I've got this calculated column :
Helper =
VAR _1 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[HL - Business Cases] <> BLANK())
VAR _2 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[HL - Storbageri] <> BLANK())
VAR _3 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[HL - Bageri] <> BLANK())
VAR Samlet = _1 + _2 + _3
RETURN
Samlet
If I put this into a measure I do not get the same result.
I have tried myself to make changes, so it should work, but without success. The closest i've got is this one :
Helper =
VAR _1 = COUNTX(HighlightGBS, CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[HL - Business Cases] <> BLANK()))
VAR _2 = COUNTX(HighlightGBS, CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[HL - Storbageri] <> BLANK()))
VAR _3 = COUNTX(HighlightGBS, CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), HighlightGBS[HL - Bageri] <> BLANK()))
VAR Samlet = _1 + _2 + _3
RETURN
Samlet
But it still don't work.
Anyone who can help, please ?
Solved! Go to Solution.
Hi @DK-C-87 - You can avoid using COUNTX because you're already working with distinct counts and conditions directly in CALCULATE.
Helper_Measure =
VAR _1 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), NOT(ISBLANK(HighlightGBS[HL - Business Cases])))
VAR _2 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), NOT(ISBLANK(HighlightGBS[HL - Storbageri])))
VAR _3 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), NOT(ISBLANK(HighlightGBS[HL - Bageri])))
VAR Samlet = _1 + _2 + _3
RETURN Samlet
Hopefully it works, If this still doesn't produce the expected results, you may need to check for how the data in HighlightGBS is structured
Proud to be a Super User! | |
Hi @DK-C-87 - You can avoid using COUNTX because you're already working with distinct counts and conditions directly in CALCULATE.
Helper_Measure =
VAR _1 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), NOT(ISBLANK(HighlightGBS[HL - Business Cases])))
VAR _2 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), NOT(ISBLANK(HighlightGBS[HL - Storbageri])))
VAR _3 = CALCULATE(DISTINCTCOUNT(HighlightGBS[Plant]), NOT(ISBLANK(HighlightGBS[HL - Bageri])))
VAR Samlet = _1 + _2 + _3
RETURN Samlet
Hopefully it works, If this still doesn't produce the expected results, you may need to check for how the data in HighlightGBS is structured
Proud to be a Super User! | |
User | Count |
---|---|
58 | |
56 | |
53 | |
49 | |
32 |
User | Count |
---|---|
172 | |
89 | |
70 | |
46 | |
45 |