Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
i am trying to write a DAX measure with if statement to return a value as assortment. if Store count =1, " Online", otherwise "Instore". both "SKU" and "Store count" are from the same dim - master table
Sku | Store Count | Assortment |
123433 | 1 | |
343433 | 234 | |
234355 | 1 | |
565466 | 454 | |
987971 | 1000 |
Thanks
Ding
Solved! Go to Solution.
Hi @dixia ,
If your store count is not calculated by DAX, you need to use DAX to calculate the store count and then use if statement.
Try the DAX like this:
Assortment = IF(calculate(count(table[store]),allexcept(table(SKU)))=1, "Online", "Instore")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dixia ,
If your store count is not calculated by DAX, you need to use DAX to calculate the store count and then use if statement.
Try the DAX like this:
Assortment = IF(calculate(count(table[store]),allexcept(table(SKU)))=1, "Online", "Instore")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
72 | |
71 | |
48 | |
41 |
User | Count |
---|---|
54 | |
48 | |
33 | |
32 | |
28 |