Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
lcasey
Post Prodigy
Post Prodigy

Report Date

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 Date10/31/2016  
    
    
    
IDDateDesc 
110/1/2016No Data 
210/2/2016No Data 
310/3/2016No Data 
410/4/2016No Data 
510/5/2016No Data 
610/6/2016No Data 
710/7/2016No Data 
810/8/2016No Data 
910/9/2016No Data 
1010/10/2016No Data 
1110/11/2016No Data 
1210/12/2016No Data 
1310/13/2016No Data 
7 REPLIES 7
Greg_Deckler
Super User
Super User

You should be able to do this with a slicer and have your report date table related to your other tables. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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 Date10/31/2016  
    
    
    
IDDateDescDateDif
110/1/2016No Data30
210/2/2016No Data29
310/3/2016No Data28
410/4/2016No Data27
510/5/2016No Data26
610/6/2016No Data25
710/7/2016No Data24
810/8/2016No Data23
910/9/2016No Data22
1010/10/2016No Data21
1110/11/2016No Data20
1210/12/2016No Data19
1310/13/2016No Data18

Can you provide some sample data, relationships and an example of what you are trying to achieve? I'm not understanding your scenario.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Sure, Sorry about that, here is a picture of what I am trying to do:

 

2016-11-09_16-37-47.jpg

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:

 

Capture.PNG

 

Capture2.PNG

 

Capture3.PNG

 

Capture4.PNG

 

 


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

OK, create a measure like:

 

MaxDOCDATE = MAX([DOCDATE])

Use that in your formula. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.