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.
Does anyone know how to work with a report date?
Every Other reporting package I have ever used includes the abiliy to choose a report date and then filter my data based on the report date.
With Power BI it seems there is no way to choose a report date, and then filter data based on that report date.
Is there some sort of DAX formula that would look at the slicers chosen report date and then filter based on that?
For Example, An End user chooses the date they want on the report and then records are filtered based on that date selected:
Report Date | 10/31/2016 | ||
ID | Date | Desc | |
1 | 10/1/2016 | No Data | |
2 | 10/2/2016 | No Data | |
3 | 10/3/2016 | No Data | |
4 | 10/4/2016 | No Data | |
5 | 10/5/2016 | No Data | |
6 | 10/6/2016 | No Data | |
7 | 10/7/2016 | No Data | |
8 | 10/8/2016 | No Data | |
9 | 10/9/2016 | No Data | |
10 | 10/10/2016 | No Data | |
11 | 10/11/2016 | No Data | |
12 | 10/12/2016 | No Data | |
13 | 10/13/2016 | No Data |
You should be able to do this with a slicer and have your report date table related to your other tables.
But I need a Column that calculates based on report date:
=DateDiff DOCDATE , REPORT DATE
But Report Date changes by the end user, I never Know what the user will choose
Report Date | 10/31/2016 | ||
ID | Date | Desc | DateDif |
1 | 10/1/2016 | No Data | 30 |
2 | 10/2/2016 | No Data | 29 |
3 | 10/3/2016 | No Data | 28 |
4 | 10/4/2016 | No Data | 27 |
5 | 10/5/2016 | No Data | 26 |
6 | 10/6/2016 | No Data | 25 |
7 | 10/7/2016 | No Data | 24 |
8 | 10/8/2016 | No Data | 23 |
9 | 10/9/2016 | No Data | 22 |
10 | 10/10/2016 | No Data | 21 |
11 | 10/11/2016 | No Data | 20 |
12 | 10/12/2016 | No Data | 19 |
13 | 10/13/2016 | No Data | 18 |
Can you provide some sample data, relationships and an example of what you are trying to achieve? I'm not understanding your scenario.
Sure, Sorry about that, here is a picture of what I am trying to do:
Hi @lcasey,
You can simply use LASTDATE and ALLSELECTED function to get the value which you want.
Sample:
lastdate = LASTDATE(ALLSELECTED(Sales[StartDate]))
firstDate = FIRSTDATE(ALLSELECTED(Sales[StartDate]))
Visuals:
Regards,
Xiaoxin Sheng
OK, create a measure like:
MaxDOCDATE = MAX([DOCDATE])
Use that in your formula.
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 |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |