The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I would like to display the sales of the current month in a line chart and that it automatically updates itself.
I've written a DAX measure but it doesn't seem to work:
Currently I get this:
However I would like to get something like this:
Solved! Go to Solution.
Hi @Niels_T
You're using a date hierarchy in your visual
Change that to just use Date. Click the down arrow beside Date (in the axis), then click on Date.
Regards
Phil
Proud to be a Super User!
Hey Philip,
I tried what you did but this is the result I get:
I have set a filter now on date -> relative date -> show items when the value: is in this year and this fixed the issue
The measure I used for current month:
Hi @Niels_T
Try this, note the 3rd parameter which is a filter
Current Month Sales = TOTALMTD(SUM('Table'[Value]),'Calendar'[Date], MONTH('Calendar'[Date]) = MONTH(TODAY()))
regards
Phil
Proud to be a Super User!
When I use this measure my graph becomes blank:
I looked into the power BI file that you provided, and I don't know what you are doing different.
I have a date table and all that so that shouldn't be an issue as well.
Hi @Niels_T
You're using a date hierarchy in your visual
Change that to just use Date. Click the down arrow beside Date (in the axis), then click on Date.
Regards
Phil
Proud to be a Super User!
Hey Philip,
I tried what you did but this is the result I get:
I have set a filter now on date -> relative date -> show items when the value: is in this year and this fixed the issue
The measure I used for current month:
@Niels_T , what you have taken on x-axis?
What you are displaying on the x-axis on the visual below?
The two visuals are not related to each other. The visual below also comes from Google Data Studio.
The axises contain the following data:
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
94 | |
80 | |
63 | |
56 |
User | Count |
---|---|
248 | |
122 | |
110 | |
77 | |
70 |