Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi, I am trying to create a report that calculates how many units are 'live' in a particular year, with the user being able to select the year and the report updating dynamically when the year is changed. Each set of units in my data can be live in either none, one or many years, so I can't simply assign a year to each and use a slicer.
What I have tried to do is the following (I am working in DAX rather than the query editor):
I have created columns that calculate the first year and the last year. This then allows me to calculate if any units are live in a particular year with this formula -
I am still very new to all of this, and I seem to think about things in the wrong way so the approaches I take to solving the problems I encounter are probably not the best!
Any help or guidance on how I can make this work would be gratefully received. If any extra iinformation would help, please let me know.
Many thanks
Note: I have updated this post as I initially sumbitted a draft version by mistake!
Let go ( a little bit ) of the idea of a "parameter". Power BI has visuals, these visuals have data feeds, and they respond to user interaction. This user interaction then filters all the visuals, and you can base "measures" on the filter choices.
Create a couple of reports to get the hang of it. After that, explore the "What If?" functionality that gives you a ready-made template for modeling behavior.
It helps the other forum users if you provide sample data, and indicate the expected outcome.
Hi Ibendlin, many thanks for this. I've not explored What If parameters yet so this definitely offers new possibilities!
However I've tried to implement one in my report and am getting the same behaviour as with a parameter. Hopefully the screenshot below helps a bit.
Each row of data has a number of net units and I want to know if they are live in a specific year. I have fields that tell me the first year and the last year that they are live, which are also shown in the table.
The filter on the table, Parameter check, is my formula that works out if they are live or not:
User | Count |
---|---|
42 | |
28 | |
24 | |
20 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |