Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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_Key | Quarter | Month | Rainmaker | Rainmaker_Qrtr | Rainmaker_Month | TCV |
100 | Q1 | Apr | Donald | Donald | Donald | 250000 |
172 | Q1 | May | John | Sam | Sunny | 500000 |
183 | Q1 | May | John | Sam | Sunny | 250000 |
186 | Q1 | May | John | Sam | Sunny | 2200000 |
546 | Q2 | Jun | Steve | Steve | Steve | 2400000 |
560 | Q2 | Jul | Mary | Steve | Mark | 200000 |
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
@SreejithR , You can create a calculated column with slicer values. For that, you need to take the help of Dynamic Segmentation.
Refer to how it works on video or these blogs: https://youtu.be/CuczXPj0N-k
https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-size-of-bi...
https://www.credera.com/blog/technology-solutions/creating-aging-report-using-a-user-selected-date-i...
Can you share sample output ?
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?
Thank you
Sreejith
User | Count |
---|---|
47 | |
28 | |
23 | |
18 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |