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 friends.
I have a Calendar Table (CALENDARIO) created with the min and max of 2 columns dates ([Plan Date] and [Real Date]) from another table (HITOS), and I use it for the X axis of a Line Chart. Also I have a date Slicer (between) created with the column [Plan Date] from the same table used before (HITOS).
On the model, I have determined 2 diferent relationship between the 2 tables:
Both relationships are inactives.
So, I need a way to change the X axis of the Line Chart with the dates selected on the Slicer.
Now I have this result:
And I need this one (I have change the date filter manually):
The model:
Can anyone help me please?
Thanks!
Solved! Go to Solution.
hi @MauroBote
Just the adjust the two measure as below:
PLAN AC =
CALCULATE(
SUM(HITOS[PESO]),
USERELATIONSHIP(CALENDARIO[Date],HITOS[FECHA PLAN]),FILTER(
ALLSELECTED(CALENDARIO[Date]),MAX(CALENDARIO[Date])<=MAX(HITOS[FECHA PLAN])&&
ISONORAFTER(CALENDARIO[Date], MAX(CALENDARIO[Date]), DESC)
)
)/HITOS[Total % PESO]
Result:
Regards,
Lin
hi @MauroBote
You need to just make some changes in the formula of the two measure.
Please share your sample pbix file for us to have a test, that will be a great help.
Regards,
Lin
hi @MauroBote
Just the adjust the two measure as below:
PLAN AC =
CALCULATE(
SUM(HITOS[PESO]),
USERELATIONSHIP(CALENDARIO[Date],HITOS[FECHA PLAN]),FILTER(
ALLSELECTED(CALENDARIO[Date]),MAX(CALENDARIO[Date])<=MAX(HITOS[FECHA PLAN])&&
ISONORAFTER(CALENDARIO[Date], MAX(CALENDARIO[Date]), DESC)
)
)/HITOS[Total % PESO]
Result:
Regards,
Lin
Thank you so much Lin. You are a genius!!!
REfer
plan =
var _min = minx(CALENDARIO,CALENDARIO[Date])
return
calculate(sum(HITOS[Plan Value]),filter(CALENDARIO,CALENDARIO[Date]>=_min &&CALENDARIO[Date]<=max(CALENDARIO[Date]))
,userelation(HITOS[Plan Date] , CALENDARIO[Date]))
actual =
var _min = minx(CALENDARIO,CALENDARIO[Date])
return
calculate(sum(HITOS[Real Value]),filter(CALENDARIO,CALENDARIO[Date]>=_min &&CALENDARIO[Date]<=max(CALENDARIO[Date]))
userelation(HITOS[Real Date] , CALENDARIO[Date]))
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
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 |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |