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 know it's quite common issue, but I still can't find the solution and there is a feeling that I'm doing something wrong.
My goal is to show in line graph qty dynamic by year and month. Main problem that there will be a filter of period necessary for other visuals.
Problems:
For example, if I filtered 2020-10 period (2020 October), I need to see in the graph all dates till 2020-10-31
I've tried to write a DAX formula that don't evaluate filter:
QTY visual =
CALCULATE(
SUM(INV[ INV_QTY ]),
FILTER(ALL('Date'[Date]), 'Date'[Date]<=MAX('Date'[Date]) ))
But it still shows just the period that is filtered.
Can you help me to figure out where I'm doing wrong?
The pbix example file is here: https://drive.google.com/file/d/1_Q_7-T9Cr6BrFdcydAnTOe9spcaJqbRv/view?usp=sharing
Solved! Go to Solution.
Hi, @Anonymous
According to your description and sample picture, I think that you want to make the line chart show the data before or in the period you selected, right? You can try my steps:
Slicer =
SELECTCOLUMNS('Date',"Period",[Period],"Date",[Date])
Then make sure it doesn’t have a relationship with any tables, which is important:
QTY visual1 =
var _selecteddate=MAX('Slicer'[Date])
return
IF(MAX('Date'[Date])<=_selecteddate,SUM(INV[ INV_QTY ]),BLANK())
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description and sample picture, I think that you want to make the line chart show the data before or in the period you selected, right? You can try my steps:
Slicer =
SELECTCOLUMNS('Date',"Period",[Period],"Date",[Date])
Then make sure it doesn’t have a relationship with any tables, which is important:
QTY visual1 =
var _selecteddate=MAX('Slicer'[Date])
return
IF(MAX('Date'[Date])<=_selecteddate,SUM(INV[ INV_QTY ]),BLANK())
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I would make sure the filter does not interact with the linechart and use the selectedvalue from the filter in your DAX formula.
Quality over Quantity
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |