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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
codyraptor
Resolver I
Resolver I

Dynamically pass Parameter Measures through calculation item

I have metrics grouped using the new Parameter function.  Is it possible to dynamically pass those metrics through 1 measure so that I can apply a calculation item against it...in this case PY?  

 

Below is what I thought would work...but doesn't seem to pass the measure when selecting from the Parameter list.

 

PY Test = CALCULATE(SELECTEDMEASURE(),'Time Intelligence'[Disp Calcs] = "PY")
 
Thanks!!
1 ACCEPTED SOLUTION

Hi @codyraptor ,

You can refer the following links to get it...

1. Using Field parameter

Change measure values dynamically in the visual

yingyinr_0-1658996848259.png

2. Create a measure dimension table

Power BI DAX Dynamic Measures

yingyinr_2-1658997002042.png

yingyinr_1-1658996934966.png

 

How to dynamically switch between measures in Power BI visuals with Field Parameters

yingyinr_3-1658997135129.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@codyraptor , This PY can be slicer value

 

CALCULATE(SELECTEDMEASURE(),'Time Intelligence'[Disp Calcs] = Selectedvalue(YearType[Year Type]) )

@amitchandak  To clarify...the filter for Year in the measure is not the issue...I need to dynamically pass the measure through the dax using the Field Parameter.  The below dax works...but I don't want to have to call out every metric and possibly lose formatting. I'd rather it recognize the selection in the Field Parameter.

codyraptor_0-1658772737596.png

 

Below is the specific visual I'm trying to support without creating multiple measures.  I have 6 metrics in the Field Parameter...I want to pass them all through PY which would make the card dynamic below...allowing me to create 1 PY measure against my 'Metrics' field parameter.  

codyraptor_0-1658781875560.png

 

 

Hi @codyraptor ,

You can refer the following links to get it...

1. Using Field parameter

Change measure values dynamically in the visual

yingyinr_0-1658996848259.png

2. Create a measure dimension table

Power BI DAX Dynamic Measures

yingyinr_2-1658997002042.png

yingyinr_1-1658996934966.png

 

How to dynamically switch between measures in Power BI visuals with Field Parameters

yingyinr_3-1658997135129.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.