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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rygar
Helper II
Helper II

Make report interactive: Send parameter from a menu to DAX /Measure

Dear Community,

 

i would like to have a Menu or something like this in my report to make a Measure/DAX more flexible/interactive.

Example: 

Quantity x Months ago = CALCULATE(SUM(Sales[OrderQuantity]),DATEADD(dDate[Date],-1,MONTH))

Here -1 is fixed.

In the published report, the user should be able to choose to go back 1, 2 or 3 months back. So a menu with a list of Values (1..3) would be fine. This menu should pass its selection to the Measure. Is this possible?

Note: I found this solution, but this sends a parameter to Power Query and is not accessible in the published report.

 

Regards, Michael

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Well that was weird. Checking out your file, the measure was indeed unresponsive. I've deleted and created the parameter table, selection measure etc and it now works:

param.gifI've attached the sample file





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

Create a new table to use as the slicer to select the month number using the New Table function under Modeling in the ribbon with:

Select Month = {1, 2, 3}

Create the slicer with the single select option in the formatting pane.

Create the following measure:

 Month =SELECTEDVALUE (Select Month[Value]) *-1

 

now substitute the hard coded -1 in your measure with the [Month] measure





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks a lot for that great Idea!

Unfortunately, inserting the measure into my expression shows no effect. Hard coded value does. 

I also tried to put the [Month] measure into VALUE() to make sure its a number, but still no effect.

Here ist the testfile. Any suggestion? 

PaulDBrown
Community Champion
Community Champion

Well that was weird. Checking out your file, the measure was indeed unresponsive. I've deleted and created the parameter table, selection measure etc and it now works:

param.gifI've attached the sample file





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hey Paul, thats great, thank you very much! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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