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 All,
I have a dashboard like this :
The graph is filtered by date slicer.
If I select for example january to May on the slicer, it will filter the graph :
My question is simple :
is it possible to select january to may in the slicer and have the x axis from January to December and the line from January to December too?
But the bars will be filtered (from January to May).
Thank you in advance 😉
Best regards
Solved! Go to Solution.
Hi@ADN75,
Hi@ADN75,
You can create a new date dimension table to help you achieve this requirement.
Date Table = VALUES('Table'[Month])
New Sales =
IF(
MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),
CALCULATE(MAX('Table'[Sales]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month])))
)
New Profit =
IF(
MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),
CALCULATE(MAX('Table'[Profit]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month]))),
0
)
Put the New Profit and New Sales instead of the original one.
Then you can use the new “month” in Date table to interact with the visual.
You will get the result like this:
Here is the demo, please try it.
If this does not solve your problem, please provide more details and be free to let me know.
Hope it helps.
Best Regards,
Caitlyn Yan
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi@ADN75,
Hi@ADN75,
You can create a new date dimension table to help you achieve this requirement.
Date Table = VALUES('Table'[Month])
New Sales =
IF(
MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),
CALCULATE(MAX('Table'[Sales]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month])))
)
New Profit =
IF(
MAX('Date Table'[Month]) in ALLSELECTED('Table'[Month]),
CALCULATE(MAX('Table'[Profit]),FILTER('Table','Table'[Month]=MAX('Date Table'[Month]))),
0
)
Put the New Profit and New Sales instead of the original one.
Then you can use the new “month” in Date table to interact with the visual.
You will get the result like this:
Here is the demo, please try it.
If this does not solve your problem, please provide more details and be free to let me know.
Hope it helps.
Best Regards,
Caitlyn Yan
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
thank you for your help !
"Profit" and "Sales" are measures in another table... so I didn't manage to use them in your DAX formula..
Hi @ADN75,
If another table already has a Month column and you want to use it as the x-axis, you can pull that column in my measure instead.
Or would you mind providing me with a pbix file without sensitive information so that I can help you better?
Best Regards,
Caitlyn Yan
Hi @v-xiaoyan-msft ,
Sorry, it's in French, my problem is GRAPH_A expected Production Wind is a measure and the error message is : column GRAPH_A expected Production Wind in table Reporting is untraceable and isn't used in this expression.
Unfornatelly, I can attach pbix file to my message. Maybe I can send you a pbix by mail?
Hi@ADN75 ,
I checked your error message and because you are referencing a measure in the formula, my formula does not work for you.
For your data security, etc., we only support to solve the problem for you on the forum, you can refer to the following article:How to provide sample data in the Power BI Forum
Best Regards,
Caitlyn Yan
@ADN75 , if the month is coming from a different table. Try this option or add +0
Hello,
A bit more explaination :
I managed to set the date axis from January to December (even if this is not the best solution because if I change the year, I need to change in the Format option of my graph too) :
On this visual, I just want the line (Profit) from January to December (not from January to July like in the date slicer).
Is it possible?
Thank you
Hi @amitchandak,
The month comes from the same table unfortunatelly. And there are data from May to December for the value I want to show...
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |