Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have the next measure in a cube in SSAS:
CALCULATE (
DISTINCTCOUNT(‘FactTable’ [Ticket Number]),
FILTER(‘FactTable’, ‘FactTable’[Amount]>0)
)
But, when I use it in Power BI for a card, I see blank when the measure is 0.
Why is it displaying blank?? How can I make it display 0.
Solved! Go to Solution.
Hi @ovonel
Ty adding +0 at the end of the formula:
CALCULATE (
DISTINCTCOUNT(‘FactTable’ [Ticket Number]),
FILTER(‘FactTable’, ‘FactTable’[Amount]>0)
) +0
Jori
If I answered your question, please mark it as a solution to help other members find it more quickly.
Hi @ovonel
You can try below code:-
measure =
VAR result =
CALCULATE (
DISTINCTCOUNT ( 'FactTable'[Ticket Number] ),
FILTER ( 'FactTable', 'FactTable'[Amount] > 0 )
)
RETURN
IF ( result = BLANK (), 0, result )
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Samarth_18 I like this option better than using +0 as it allows the user to further expand on the measure if needed. +0 works fine but it doesn't have the "agility" of using "If ( result = BLANK ()" or " IF ( ISBLANK (result) , 0...". Well done on this response.
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @ovonel
Ty adding +0 at the end of the formula:
CALCULATE (
DISTINCTCOUNT(‘FactTable’ [Ticket Number]),
FILTER(‘FactTable’, ‘FactTable’[Amount]>0)
) +0
Jori
If I answered your question, please mark it as a solution to help other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
109 | |
88 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |