Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a dax cacualtion that currenty finds and averages the baseline for events . I am trying to figure out how to create a dynamcic baseline where I can choose what years are included in the baselines. For example, baseline currently gets the years 2022-2024. What I am trying to figure out a way is to either being able to select invidual years or a range of years for the baseline. I am looking for any adivce or gudiance on how to alcompish this.
Hi @mikess1281
To create a dynamic baseline where you can select specific years or a range of years:
Create a Year Selection Table: Use a table (e.g., Yearselection) with a list of years you want to include. You can use Calender() to create this table.
Use Slicers: Add a slicer to your report for year selection based on the Yearselection table.
Dynamic DAX Measure: Modify your DAX calculation to filter the events by the selected years:
DynamicBaseline =
VAR SelectedYears = VALUES(YearSelection[Year])
RETURN
AVERAGEX (
FILTER (
'EventData',
YEAR('EventData'[EventDate]) IN SelectedYears
),
'EventData'[BaselineValue]
)
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Hi @mikess1281 ,
You can refer the following links to get it by creating line chart with analytic line.
Use the Analytics pane in Power BI Desktop - Power BI | Microsoft Learn
DynamicBaseline =
CALCULATE(
AVERAGE(YourTable[EventValue]),
FILTER(
YourTable,
YourTable[Year] IN VALUES(YearTable[Year])
)
)
Solved: Dynamic baseline and UOM - Microsoft Fabric Community
Best Regards
We want to help you but your description is too vague. Please write it again clearly.
Please DON'T copy & paste your DAX that does not work and expect us to fathom what you want to do. That is a bit crazy. 😀
Please just give a simple non technical functional description of what you want, then let us suggest the solution. Thank you.
Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.
Remove any unneeded columns which may cause confusion.
Rename columns to user friendly names.
Also provide the example desired output, with a clear step-by-step description of calculations the process flow.
Remember not to share private data ... we don't want you to get into trouble. 😧
Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.
Try keep it simple and ask one question per ticket.
You will get a quick response if you put time, care and effort into writing clear problem descriptions.
Remember you are gertting free expert help, so please put lots of proper effort to asking questions and providing examples.
Vaugue descriptions can waste your time and our time.
Look forward to helping you when the above information is forthcoming
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |