Dynamic slicers with Parameter Field Budget/Forecast & MTD/YTD

Regret, I am posting same query again because I didn’t get a solution.

I have two scenarios with separate slicers Budget/Forecast & MTD/YTD.
I need result in 1 column, example if I select budget it show me budget and if I select MTD it show me MTD based on selection.

Sale value will be change based on MTD or YTD.

Please find the attached sample report.

image
DNA QA.pbix (81.9 KB)

Hello @khurram,

For this scenario I would use field parameters and calculation groups, The Budget, forecast switch is already handled with that so one less thing to do. So about MTD and YTD perspective, the calculation groups are created just for those type of scenarios.

Calculation logic will the the same that you are already using, just instead of a measure you will use selectedmeasure()

If you don’t want to use tabular editor then you can handle it with switch() function but solution above is generally speaking the most optimized from performance point of view.

Hope that helps

Hello Piniusz,
Thanks for responding. At this point, I’m not using tabular editor.
If possible, can you please solve it with switch() function. Sample pbix file is already attached.

Thank you

As said, switch method is slower in performance and you have no dynamic header but here it is.

First let’s change your “Scenario” table to regular one, that we can use in slicer
image

Then we will do switch based on selected value on KPI column. This is a measure created
image

Now we want to have a time intelligence based on it. So let’s change your “MTD” and “YTD” measure
image
image

And you can use “Scenario 2” fields and should work as intended

I am sending PBIX file with those fixes
DNA QA.pbix (83.3 KB)

Hello Piniusz,
Thank you so much. I was looking same output as you have done.
Can we do a dynamic header based on both slicers, like MTD Actual / MTD Forecast or YTD Actual / Forecast.
YTD and MTD is showing currently.

Hello Piniusz,
Can you please respond the following queries when you have time.
Can we do a dynamic header based on both slicers, like MTD Actual / MTD Forecast or YTD Actual / Forecast.
YTD and MTD is showing currently.

I did not notice your response,

you can use measure for table title. Try this

Table title = 
var _KPI = SELECTEDVALUE('KPI'[KPI])
var _persepctive = MAXX('Scenario 2','Scenario 2'[Scenario 2])
var _results = _KPI & " in " & _persepctive & " perspective"
return
_results

obraz

Hello Piniusz,
Thanks for responding. I need dynamic column name instead of table title based on both slicers.

Best Regards,

The only way for dynamic column name that I know of is field parameters, but then you would have to have 1 slicer with 4 options(mtd actual, ytd actual, mtd forecast, ytd actual) .
The workaround could be putting text box on top of a column header but I do not like the sound of it

Hi @khurram, did the response provided by @piniusz help in solving your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query.

Hi @khurram, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.