Forum Discussion
DAX calulation help for identifying blank values
Hello all,
I am new to Power BI and need some help please.
I'm looking for a DAX calculation to help me identify where a marker hasn't been added to a case. See table below where I have my columns Case ID, Case category and Marker. In this example the case categories Performance and Contract should also have a Marker but they don't. My Case category Pay doesn't need a marker.
What I think I want is a new column that looks to see if there is a marker, if there isn't it looks to see what the case category is, then based on that information it creates a flag in a new column to identify a case category that should have a flag doesn't have one.
I hope that makes sense. Any help would be much appreciated.
Regards,
Emily.
Hi EmilyM2019 ,
Go to Power Query, go to Add Column tab, Conditional Column and add along the lines below. You can put in multiple statements.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
13 Replies
- Nathaniel_CCommunity Champion
Hi EmilyM2019 ,
Go to Power Query, go to Add Column tab, Conditional Column and add along the lines below. You can put in multiple statements.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel- EmilyM2019Helper II
Nathaniel_C Thanks I will give this a go. Although the fact that I can't even post a table into this message thread doesn't fill me with much hope 😉
- Nathaniel_CCommunity Champion
Hi EmilyM2019 ,
Try copy and paste. Below I copied this table from Power BI and pasted here. It makes it easy for your forum helpers to copy and paste into their enter data in Power BI.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
OrderMetric AHighest Metric Same Orderbeta 42 10 12 beta 42 12 12 beta 71 11 17 beta 71 17 17 Delta 101 21 21 Delta 101 5 21 Delta 101 6 21 Alpha 102 10 15 Alpha 102 12 15 Alpha 102 15 15 Alpha 102 3 15 Alpha 102 7 15 ETA 52 10 14 ETA 52 12 14 ETA 52 14 14 ETA 52 5 14 ETA 52 6 14
- EmilyM2019Helper II
I ended up using the conditional column solution to identify the need for a marker.
I then did nested IF to identify where there should be a marker but there wasn't one.
Thanks for all the help.
- Nathaniel_CCommunity Champion
Need the table, please.
- EmilyM2019Helper II
Trying to post it 🙂 🙂
- JonVHelper II
You could also do an added column in the modeling tab (not in Power Query) using DAX like this:
New Marker = IF( OR(TableName[CaseCategory] = "Performance", TableName[CaseCategory] = "Contract") = TRUE, "Yes", TableName[Marker])This simply checks to see if the Case Category is one of the two values required. If so, it returns "Yes". If not, it defaults to whatever the current Marker is.
If you want to do it in the Query Editor, you can do as Nathaniel suggested and then merge the columns to get a single value.
- Nathaniel_CCommunity Champion
Hi JonV ,
However, less of a performance hit when you use Power Query over a calculated column.
Nathaniel
- v-lid-msftCommunity Support
Hi EmilyM2019 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.