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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Last 7 days of order booking list

I have a sales order list as i need the order booking list of last 7 days, so how can i do by using dax funtion.

5 REPLIES 5
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jdbuchanan71
Super User
Super User

Try this one.

Last 7 Days =
CALCULATE (
    COUNTROWS ( 'Table' ),
    KEEPFILTERS ( DATESINPERIOD ( 'Table'[Date], TODAY (), -7, DAY ) )
)
jdbuchanan71
Super User
Super User

@Anonymous 

The measure would be something like this.

Last 7 Days =
CALCULATE (
    SUM ( 'Table'[Sales] ),
    KEEPFILTERS ( DATESINPERIOD ( 'Table'[Date], TODAY (), -7, DAY ) )
)
Anonymous
Not applicable

Thank yoy for the respons @jdbuchanan71 

But its not loading the data.

Here is the error box

Vijayashree98_0-1650257925016.png

 

In the Query Editor, ensure that the Data Type of the Sales column is numeric.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.