Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I have written a dax code.
My aim is to count all the store number that has value greater than 0 as per the condition specified by the STORE variable. But I am not able to produce the retyurn statement
The DAX Code that I have written is as follows:
VAR _Reference_Date = MAX('Date'[Date])
I should get the Total 5 as these many store has Measure >1 but I am getting 7. I am also getting Total as 1 instead of 5. Please do help
Solved! Go to Solution.
Hi @Mkrishna ,
Please try:
RETURN SUMX(VALUES('Main Table'[Store Number]),IF(store>0,1,0))
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Try this
Return CALCULATE(
IF(STORE > 0, 1, 0),
FILTER(Customers, STORE > 0)
)
Hi @Mkrishna ,
Please try:
RETURN SUMX(VALUES('Main Table'[Store Number]),IF(store>0,1,0))
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum