Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello All,
I have a sample data of sales which has applications, their categories and sales.
I need to calculate the distinct count of applications which has sales as zero or blank.
I have Sample data like the above picture, I need to calculate the count of applications
I have written the Sql Query But need help in converting it into DAX
select Application,Count(Application)as appcount, SUM(ISNULL([Actual Date],0)) from DWH.[Report Check Data]
Where IsDeleted=0
Group By Application having SUM(ISNULL([Actual Date],0))=0
Order By Application
when I tried the above query in sql i am getting the below output
Can anyone please help me on this..
Solved! Go to Solution.
Hi @mahg1kor ,
According to your statement, I think your issue should be caused by that OR() function will return True or False result, you need to add it in FILTER() function.
_Modified Count of Actual date <0 =
CALCULATE (
DISTINCTCOUNT ( 'Monitoring Report Check Data'[Application] ),
FILTER (
'Monitoring Report Check Data',
OR ( ISBLANK ( [_SUM of actual date] ), [_SUM of actual date] = 0 )
)
)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@audreygerred
Thanks for your response, I have tried your solution but giving the below error.
I am expecting the result of Count of Application column from below sql query output which should be 3.
select Application,Count(Application)as appcount, SUM(ISNULL([Actual Date],0)) from DWH.[Report Check Data]
Where IsDeleted=0
Group By Application having SUM(ISNULL([Actual Date],0))=0
Order By Application
Please help..
Hi @mahg1kor ,
According to your statement, I think your issue should be caused by that OR() function will return True or False result, you need to add it in FILTER() function.
_Modified Count of Actual date <0 =
CALCULATE (
DISTINCTCOUNT ( 'Monitoring Report Check Data'[Application] ),
FILTER (
'Monitoring Report Check Data',
OR ( ISBLANK ( [_SUM of actual date] ), [_SUM of actual date] = 0 )
)
)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
34 |
User | Count |
---|---|
95 | |
78 | |
52 | |
49 | |
47 |