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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ahuhn
Advocate I
Advocate I

Use parameter in measure

I have a simple dataset

 

StatusMonthUpdated
Alpha201810
Alpha201810
Beta201810
Gamma201810
Delta201809
Alpha201809
Alpha201809
Alpha201808

 

What I want to do is create two parameters so the user can find the difference in counts between two months. I want the user to select month1 = their choice (preferaby from a table or dropdown), select month2 = their choice as well. ie difference between 201810 and 201809 for Alpha status is 0, but 201810 and 201808 is 1

 

So far, I tried:

 

1) Measure = CALCULATE(COUNT(Sheet1[Status]),FILTER(Sheet1,[MonthUpdated]=YYYYMM && [Status]="Alpha")), but this does not update when I change the parameter value YYYYMM via home --> edit queries --> edit parameters

 

2)  Following from https://community.powerbi.com/t5/Desktop/use-parameters-in-dax/m-p/536964/highlight/false#M251956 does not work, as this uses slicers, and after selecting for one month via a slicer table, the second selection is limited to the value of the first slicer,

 

3) Following https://community.powerbi.com/t5/Desktop/Use-parameter-in-measure/m-p/349842#M157174 failed because the what-if parameter permits only continuous numeric values.

 

Suggestions are most appreciated

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

I would use two disconnected tables with your values and two slicers. Use MAX to grab the value of your slicer. You could create your tables by using something like:

 

Table1 = DISTINCT('Table'[MonthUpdated])

Table2 = DISTINCT('Table'[MonthUpdated])

 

Don't relate them to anything.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

I would use two disconnected tables with your values and two slicers. Use MAX to grab the value of your slicer. You could create your tables by using something like:

 

Table1 = DISTINCT('Table'[MonthUpdated])

Table2 = DISTINCT('Table'[MonthUpdated])

 

Don't relate them to anything.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors