Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to create a measure so that when you open the Power BI report, the values on the report are shows as Current Month (i.e. no date filter has been applied), however when a date filter is applied, then instead of going blank it should show the figures according to that month.
My base measure is:
Tasks = COUNTROWS(TABLE)
Based on this measure I have created another measure which is:
Tasks2 = IF(ALL(TABLE),CALCULATE([Tasks],FILTER(Date,[This Month]=1)),[Tasks])
So, if no filters are selected then calculate current months total, else calculate selected date/month/year total.
Any help would be useful.
Thanks
Hi @BA1503 ,
You can create measure Tasks using DAX below, assuming the date filter is referred to field [DateKey].
Tasks = CALCULATE(COUNTROWS('TABLE'),ALLSELECTED('TABLE'[DateKey]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Amy,
Thank you for your assistance. However I don't think that is showing what it is that I am after. So I will elaborate on my query to streamline what it is that I'm after.
Currently I have 3 slicers, Date, Month and Year. When nothing is selected in these slicers, the report shows information for over 6 years worth of data. So what I'm trying to do is, before any slicers are selected, the visuals would show results based on the current month, and then when a date/month/year is selected then the visuals would display results based on those slicers.
As you can see in the image above, the left chart shows current months figures (no slicers selected, done by measure), the right chart shows all figures which would then get filtered by the slicers.
So is there a way to combine these two, so that if no slicers have been selected it shows the left chart, but once the slicers get selected it shows results based on the selected value.
Thanks again.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |