Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Nazdac911
Helper II
Helper II

Using DAX, not calculated columns. Getting another value if text column contains specified value

Hi All 

I faced the following challenge

From the following virtual table I want to be able to filter through 3 slicers [ City , Store, Category]

Nazdac911_0-1667848416959.png

and then showing the following results:

Nazdac911_2-1667848677608.png

 

  • Field: Shows a different values than the existing values depend on conditional equation (Switch or If)
  • Profit: Sum(table[Profit])
  • Units: Changes depends on slicers

The challenge is to be able to change the column values depend of their contents and  show updated values in the resulted table.

PS, I don’t have permission to create calculated columns , so this should  be done with DAX measures.  

Thanks in advance 

Regards 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Nazdac911 ,

 

Is it probably similar to this format?(the data I use are different from yours)

vmengzhumsft_0-1669194268034.png

create the following measure:

PRD = IF('Table'[field]="product 1 high quality","PRD 1",IF('Table'[field]="product 2 high quality","PRD 2","PRD 3"))
profits = CALCULATE(SUM('Table'[profit]),FILTER(ALL('Table'),'Table'[PRD]=SELECTEDVALUE('Table'[PRD])))

 

You can also refer to my pbix file for better understanding.

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Nazdac911 , Can you give example of what values you want to show here

 

  • Field: Shows a different values than the existing values depend on conditional equation (Switch or If)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for the fast reply 

For example : if I have "Product 1 high quality value " then show in the report "Prd 1" 

in other word , insted of draging a column to the table visual , i need to use a mesure that will change tests in the column

I hope this answer your question 🙂 

Looking forward hearing form you

Regards

Anonymous
Not applicable

Hi @Nazdac911 ,

 

Is it probably similar to this format?(the data I use are different from yours)

vmengzhumsft_0-1669194268034.png

create the following measure:

PRD = IF('Table'[field]="product 1 high quality","PRD 1",IF('Table'[field]="product 2 high quality","PRD 2","PRD 3"))
profits = CALCULATE(SUM('Table'[profit]),FILTER(ALL('Table'),'Table'[PRD]=SELECTEDVALUE('Table'[PRD])))

 

You can also refer to my pbix file for better understanding.

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.