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
prakash11440278
Post Prodigy
Post Prodigy

Last Quarter, This Day Last Quarter

Hi All,

Please share the dax expressions for the below formulas. Measure is Qty and dimension date[date]. 

 

 MeasureDefined asMeasure Notes
1)Total  
 Qty Sum of [qty]Total Qty in Units
2)Last Qtr Measures for Last Fiscal Qtr 
 Qty (U) - LQSum of [qty] for Last QtrTotal Qty in Units for Last Qtr
3)This day Last Qtr Measures for this day Last Fiscal Qtr
 Qty (U) - DLQSum of [qty] for this day Last QtrTotal Qty in Units for this day Last Qtr
4)Cur Qtr Measures for Current Qtr 
 Qty (U)Sum of [qty] this QtrTotal Qty in Units this Qtr
5)Cur Year Measures for Current Year 
 Qty (U)Sum of [qty] this YearTotal Qty in Units this Year
6)Last Year Measures for Last Fiscal Year 
 Qty (U) - LYSum of [qty] for Last YearTotal Qty in Units for Last Year
7)This day Last Year Measures for this day Last Fiscal Year 
 Qty (U) - DLYSum of [qty] for this day Last YearTotal  Qty in Units for this day Last Year
1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

this is the DAX code for the 1st measure you are looking for:

Total Quantity = SUM('<name of the facttable>'[<name of the quantity column>])

and here you will find all the other measures:

https://www.daxpatterns.com/time-patterns/

 

From my point of view it will be very beneficial if you try to figure out the measures by yourself, if you need further assistance, please provide a pbix file that contains sample data, like a dedicated calendar tabel and at least one fact table, upload the file to onedrive or dropbox and share the link.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey,

 

this is the DAX code for the 1st measure you are looking for:

Total Quantity = SUM('<name of the facttable>'[<name of the quantity column>])

and here you will find all the other measures:

https://www.daxpatterns.com/time-patterns/

 

From my point of view it will be very beneficial if you try to figure out the measures by yourself, if you need further assistance, please provide a pbix file that contains sample data, like a dedicated calendar tabel and at least one fact table, upload the file to onedrive or dropbox and share the link.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.