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.
Hello, genius!
I have some problems like below,
I want to make "From Date" and "To Date" from Date slider as filter value.
But once I want to make them as filter values, it doesn't work.
Inventory($) is Sum of Inventory between Date slider.
F.D Inv($) should be Sum of Inventory at only From Date (12/26/2016),
but it's the same as Inventory($) between Date slider.
T.D Inv(S) should be Sum of Inventory at only To Date (12/18/2017),
but it's the same as Inventory($) between Date slider.
The measure formulas are like below red lines.
why does this happen? T.T
Solved! Go to Solution.
Hi @MarieJ,
Here I made a test to meet your requirement.
At first, create a dimtime table using DAX below and create relationship between table1 and dimtime table.
Dimtime = CALENDARAUTO()
Then create the measures in table1 as below:
from Date = CALCULATE(MIN(Dimtime[Date]),ALLSELECTED(Dimtime[Date]))
To Date = CALCULATE(MAX(Dimtime[Date]),ALLSELECTED(Dimtime[Date]))
T.D Inv($) = CALCULATE(SUM(Table1[Inventory]),FILTER(ALLSELECTED(Table1[Date]),Table1[Date]=[To Date]))
F.D Inv($) = CALCULATE(SUM(Table1[Inventory]),FILTER(ALLSELECTED(Table1[Date]),Table1[Date]=[from Date]))
Then we can create date slicer using date field of dimtime table and get the result as below.
For more information, please check the pbix as attached.
https://www.dropbox.com/s/0xqnma3e45moifx/how%20to%20get2.pbix?dl=0
Regards,
Frank
Hi @MarieJ,
Here I made a test to meet your requirement.
At first, create a dimtime table using DAX below and create relationship between table1 and dimtime table.
Dimtime = CALENDARAUTO()
Then create the measures in table1 as below:
from Date = CALCULATE(MIN(Dimtime[Date]),ALLSELECTED(Dimtime[Date]))
To Date = CALCULATE(MAX(Dimtime[Date]),ALLSELECTED(Dimtime[Date]))
T.D Inv($) = CALCULATE(SUM(Table1[Inventory]),FILTER(ALLSELECTED(Table1[Date]),Table1[Date]=[To Date]))
F.D Inv($) = CALCULATE(SUM(Table1[Inventory]),FILTER(ALLSELECTED(Table1[Date]),Table1[Date]=[from Date]))
Then we can create date slicer using date field of dimtime table and get the result as below.
For more information, please check the pbix as attached.
https://www.dropbox.com/s/0xqnma3e45moifx/how%20to%20get2.pbix?dl=0
Regards,
Frank
Oh My God!
You're the genius to save my days!
Thank you so much!!
The problem was "ALLSELECTED"!!
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 |
---|---|
116 | |
102 | |
78 | |
76 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |