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
SreejithR
Frequent Visitor

Dynamic Column selection based on Slicer selection

Hi All,
I am new to power BI and DAX and looking for solution for below issue.
I want to generate a runtime dynamic column based on slicer selection
Sample data as below.

 Opportunity_KeyQuarterMonthRainmakerRainmaker_QrtrRainmaker_MonthTCV
100Q1AprDonaldDonaldDonald250000
172Q1MayJohnSamSunny500000
183Q1MayJohnSamSunny250000
186Q1MayJohnSamSunny2200000
546Q2JunSteveSteveSteve2400000
560Q2JulMarySteveMark200000

 

And the use case as below,

   If user has done any slection on Quarter Slicer, column "Rainmaker_Quarter" to be considered for the dynamic column
   Else if user has done a slection on Month Slicer, column "Rainmaker_Month" to be considered for the dynamic column
   Else column "Rainmaker" to be considered for the dynamic column

 

I am able to write it in a calculated measure like below

MeasureRainmaker = IF(ISFILTERED(pre_sls_tbl[Month]),pre_sls_tbl[Rainmaker_Month],IF(ISFILTERED(pre_sls_tbl[Quarter]),pre_sls_tbl[Rainmaker_Quarter],pre_sls_tbl[Rainmaker]))

But it doesnt look useful for me as I can't put the measure in the X-axis of a bar chart.
Basically my bar chart to show various rainmakers on X axis and curresponding TCV on Y axis depends on the slicer selection.
Can anyone please guide me?

 

thanks

Sreejith

3 REPLIES 3
amitchandak
Super User
Super User

Hi @amitchandak,

 

Thank you for your kind reply.

I have gone through the links you have provided, unfortunately still unclear on how to achieve this with Bins and Groups.

Coud you please help elaborating it little more, or can you please share some steps I should perform in power bi desktop?

 

thanks

Sreejith

Hi All,

Any help/guidance in this?

Basically I am trying to show my Visual1 barchart X axis dynamically based on the period selection in visual2. If quarter selected in visual2, show values from column Rainmaker_Quarter in visual1 x-axis, if month selected, show values from Rainmaker_Month column else Rainmaker column. The use case looks to be pretty straight forward and easily achievble in tableau. I am new to Power BI and struggling to achieve this. Can anyone please guide?

 

Sample_Dashboard1.png

 

Thank you 

Sreejith

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors