Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a problem with IF statement which is not working perfectly, do you have any idea why it is not working very well?
Hi, @elif ;
Hi, @elif ;
Can you share a simple data removing sensitive information, along with the results you want to output?
It makes it easier to give you a solution.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@elif , If this is a column, this will not work
POS Type NEW = IF([is grater] = 1, "NPI", 'Product'[POS type])
It needs to be a measure
example
POS Type NEW = IF([is grater] = 1, "NPI", max('Product'[POS type]) )
Hi @amitchandak
I tried both of them but still not working. When I try your suggestion it gives me just 2 Product Type but has to be 5 like Core Product, Identity, NPI, Custom, outofscope, and the NPI calculation is wrong as well.
@elif , This will not work as column,
You have create a measure as, you are using measure in calculation
POS Type NEW = IF([is grater] = 1, "NPI", max('Product'[POS type]) )
Not get this working as a Column, you need an independent table(assume POS Type) with these two values. using a group by NPI name you need create a new measure to get this working
new Measure
Sumx(filter(Values(Table[MPI Name]), [POS Type NEW] = max(POS Type[POS Type])), [measure])
refer this blog or video for steps
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 6 | |
| 6 |