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
Hi All,
I'm trying to create a calculated column based on some specific criteria.
So i have a list of LCV registration numbers and i want to identify which ones still have an mot. So the column should be: vehicles[vehicle_has_MOT). I want to see "1" when the vehicle has the MOT product, and "0" when it doesn't.
MOT is a parent product in the same table, and has the three sub products in a separate column:
Reg Product Product Type Policy Count (we use 1 or 0) CALC_COLUMN
ABC MOT Single Payment 1
ABC MOT Monthly Payment 0
ABC MOT FOC 0
I want the CALC_COLUMN to do something like vehicles_[has_MOT]=1
apologies if this is obvious, i'm new to Power BI 🙂
Solved! Go to Solution.
Hi @James__
Can you please try this DAX for calculated column
Proud to be a Super User! | |
CALC_COLUMN = IF( Product = "MOT", 1, 0 )
Paste it in the new column.
Accept it as a solution if its help you to solve your problem.
@James__
In your example,
Reg Product Product Type Policy Count (we use 1 or 0) CALC_COLUMN
ABC MOT Single Payment 1
ABC MOT Monthly Payment 0
ABC MOT FOC 0
2nd and 3rd line has product MOT, but why you are showing 0 inplace of 1
Please confirm
Proud to be a Super User! | |
Hello @PijushRoy
The MOT has 3 separate products: Single payment, monthly payment and FOC. In the example above, this particular van has a single payment MOT product, and not monthly payment or FOC.
Hope that helps.
J
Hi @James__
Can you please try this DAX for calculated column
Proud to be a Super User! | |
Sorry, that didn't work 🤔
Hi there!
You can try this:
IF( Product = "MOT", 1, 0 )
Let me know if that helps!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |