Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
51 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |