Forum Discussion
How do I write an IF then formula
I have a table and I need to show the data depending upon one column, I am trying to write a measure that will show the number of work items if that colu
Hi e77948 ,
In Power Query, it's like this:
if somethingIsTrue then doThis else if somethingElseIsTrue then doThisThingInstead else doThisThingIn DAX, it's like this:
IF( somethingIsTrue, doThis, doThisThingInstead )Pete
Ah, ok, my bad. Text functions don't skip blanks.
Try this one:
if [Tags] = null then "Primary" else if Text.Contains([Tags], "Secondary") then "Secondary" else "Primary"Pete
9 Replies
- Vijay_A_VermaMost Valuable Professional
Please refer to - How to Get your Question Answered Quickly - https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- AnonymousNot applicable
Hi e77948 ,
Sorry for that the information you have provided is not making the problem clear to me.
Can you please share more details (your tables, your problems, the expected output) to help us clarify your scenario? Or try methods provided by BA_Pete .
Refer to:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Eyelyn Qin- e77948Regular Visitor
if Text.Contains([Tags], "Secondary") then "Secondary" else "Primary" or if isBlank([Tags], "Primary")