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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
xuxxay88
Helper I
Helper I

Dynamic column contents based on slicer

Hi,

 

I'm trying to have a table visual that shows Retail Group Name and number of sales per group or the Retail Store Name and number of sales per store depending on whether a slicer is used or not. I've tried the below but it doesn't seem to work with dynamic colums.

 

So if the Group is filtered, show the stores within that group in the table visual, if the group is not filtered, show the Groups in the table visual.

 

GroupStoreSwitch = SWITCH(ISFILTERED(RetailGroup[Name]),TRUE(),Store[Name],FALSE(),RetailGroup[Name])

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi  @xuxxay88  ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @xuxxay88 ,

 

You may create a calculated column in table 'RetailGroup', then create column [GroupStoreSwitch] like DAX below, assuming there is already a relationship between the two tables.

 

RelatedStoreName= RELATED(Store[Name])



GroupStoreSwitch = SWITCH(ISFILTERED(RetailGroup[Name]),TRUE(),RetailGroup[RelatedStoreName],FALSE(),RetailGroup[Name])

Best Regards,

Amy 

 

Community Support Team _ Amy

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.