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 August 31st. Request your voucher.
hello everyone.
I am asking for your help, since this topic is driving me crazy. I've been trying to do a DAX based on a basic count, which is pretty simple. What I'm looking to do is to have the result of that DAX shows the blank fields as "0", but I haven't been able to find a good solution.
The formula I am using is the following:
StatusCountByCustomer =
SUMX(
VALUES('Retail Calendar'[Partner Name]),
CALCULATE(
DISTINCTCOUNT('Retail Calendar'[Status])
)
)
The options I have used to display the "0" are the following:
StatusCountByCustomer3 =
VAR StatusCountByCustomer = SUMX(
VALUES('Retail Calendar'[Partner Name]),
CALCULATE(
DISTINCTCOUNTNOBLANK('Retail Calendar'[Status])
))
RETURN
IF(
StatusCountByCustomer = BLANK(),
0,
StatusCountByCustomer
)
This is an example on where I want to show the blank results as "0"
Thank you guys in advance! Hoping you can help me.
Not recommended for "big" number of rows, but you can always "add zero", like
Your measure + 0
Hope this help / kudos appreciate
Proud to be a Super User!
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
8 | |
8 |