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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
menphis21
Helper IV
Helper IV

Using a parametrer in dax for all the app?

HI
i have an app that i need to update all quarter.

 I want to create a parameter, for example Actual_Quarter = "Q1", and then use this parameter inside a DAX measure.

For instance, I want to create a measure like:

Market Cap = CALCULATE( SUM('DB'[value]), FILTER('DB', 'DB'[variable] = "Market Capitalization"), -- Filter using the parameter here )

How can I define such a parameter and use it effectively in the CALCULATE() function?

Thanks

1 ACCEPTED SOLUTION

Hello,
Thank you.
I found another solution.
you can create a parameter in Power Query ( Manage Parameters - New Parameter) and for example create Year = 2025
you need to right click on this parameter and enable Load enable.

and as you will be able to change your parameter, it will be updated after a refresh.

 

Thanks

View solution in original post

3 REPLIES 3
v-karpurapud
Community Support
Community Support

Hi @menphis21 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-karpurapud
Community Support
Community Support

Hello @menphis21 


Welcome to the Microsoft Fabric Forum,
 

Regarding the measure to dynamically filter your data by quarter using a parameter in DAX,

 

1. Create a disconnected parameter table to allow flexible quarter selection:

   

    DAX:
    

QuarterParameter = DATATABLE(
    "Quarter", STRING,
    {{"Q1"}, {"Q2"}, {"Q3"}, {"Q4"}}
)

 

2. Add a slicer to your report using the QuarterParameter[Quarter] column. This enables users to select the active quarter dynamically.

 

3. Define a new measure that captures the user's selection and includes a default value to avoid errors:
    
   DAX:
   

SelectedQuarter = SELECTEDVALUE(QuarterParameter[Quarter], "Q1")

 

4. Create Market Cap measure to incorporate the selected quarter as a filter:
  
    DAX: 
   

Market Cap =
VAR Selected = [SelectedQuarter]
RETURN
CALCULATE(
    SUM('DB'[value]),
    'DB'[variable] = "Market Capitalization",
    'DB'[Quarter] = Selected
)


5. Make sure that the 'DB'[Quarter] column has values in the same format as your parameter table (e.g., "Q1", "Q2"). If necessary, you can format or extract the quarter from a date column using Power Query or DAX

 


If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.

 

Thank you for being part of the Microsoft Fabric Community.



 

Hello,
Thank you.
I found another solution.
you can create a parameter in Power Query ( Manage Parameters - New Parameter) and for example create Year = 2025
you need to right click on this parameter and enable Load enable.

and as you will be able to change your parameter, it will be updated after a refresh.

 

Thanks

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.