March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
84 | |
66 | |
54 | |
43 |
User | Count |
---|---|
203 | |
106 | |
98 | |
65 | |
56 |