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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
andrescaso
Resolver I
Resolver I

Create a dynamics column depending on a filter

Hi

 

I try to create a dynamics columns for a visual table for group a "CV1" values, depending the slice filter, i use this formula in a new column:

CV1 = if(SELECTEDVALUE(FILTRO_HIPODROMO1[HIP])="CHS";'Canales de Venta'[CANAL VENTA];if(SELECTEDVALUE(FILTRO_HIPODROMO1[HIP])="CHC";'Canales de Venta'[CANAL VENTA CHC];if(SELECTEDVALUE(FILTRO_HIPODROMO1[HIP])="HCH";'Canales de Venta'[CANAL VENTA HCH];'Canales de Venta'[CANAL VENTA VSC])))
 
This is my report, and the slice filter is where appear VSC
cv.png

 

 
But if a change the value, the "IF" formula only put the value of error, thus, the column CV1 in the visual table don´t recognize the logical in the formula
 
Please Help me, 
 
Regards
2 REPLIES 2
MFelix
Super User
Super User

Hi @andrescaso ,

 

Calculated columns cannot be made based on a slicer selection only measure can do that.

 

I'm assuming that you have a data table with all your CANAL VENTA columns, I believe that the best option is to unpivot this columns so you get a field of Attribute and Value where attribute will be the columns name, then just add a colum related to the FILTROHIPODROMO1[HIP] and then use the Attribute column on your table visual.

 

If you want share a sample of your data and I can make an example for you.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks for the answer

 

You are ok, i have a data table with all your CANAL VENTA column,

But i have a problem if unpivot this columns, the data table is related with other data table with cardinality 1 to many, thus, the pivot have a error

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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