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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors