Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All!
I've come as a sort of cry for help. I'm relatively new to PowerBi and all the complexities that come with DAX and measures. So I would appreciate some clarity on this problem I'm having.
DATA GIVEN:
The data I am working with is a mix of sources and measures. I have country names and information on population numbers 'with coverage' for a range of years 2002-2019. Measures are used to calculate those without coverage and any other relevant stats (%, multipliers)
GOAL:
The following table is a table I am trying to replicate using measures (i.e avoiding having to manually create a dataset looking like this for more years) and inputs from the user in the form of a range of years (i.e. comparing 2004-2017 would mean looking at only 2004 and 2017, what is in between does not matter). DW stands for drinking water and the datset is demonstrating the coverage in # of people. The data set is larger than this and has data relating to years spanning 2002-2019. There are also more calculations involved later down the line. For now, I am attempting a basic replication of 2018-2019.
CURRENT PROCESS:
The above image shows what the filter range looks like with two measures calculating the MIN or MAX of the range input. This functions (as you can see from the table on the far right). I use the following:
Solved! Go to Solution.
@NatalieB , Change these two and try
YearMin = CALCULATE(MIN('DATA'[Year]), allselected() )
YearMax = CALCULATE(MAX('DATA'[Year]), allselected())
Hello Amit!
Thank you for the suggestion! I can't believe such a simple solution fixed my headache. Now I can continue on with the rest of the calculations! Hopefully nothing else pops up haha!
Hello Amit!
Thank you for the suggestion! I can't believe such a simple solution fixed my headache. Now I can continue on with the rest of the calculations! Hopefully nothing else pops up haha!
@NatalieB , Change these two and try
YearMin = CALCULATE(MIN('DATA'[Year]), allselected() )
YearMax = CALCULATE(MAX('DATA'[Year]), allselected())
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |