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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

Reply
Anonymous
Not applicable

Adding QTD and YTD to DimDate

Hi Experts

 

How would you add to a dimdate calender table the QTD and YTD columns so when you select either QTD or YTD in a slicer we get the correct sales for that period. i have created the necessary relationship between DimDate and DinSales tables..  

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

So, without sample data, can only sort of guess, but it should be something like what I have in a bunch of my Quick Measures like Time Intelligence the Hard Way:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

You will also probably want Quarter:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Quarter/m-p/391541

 

Otherwise, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

So, without sample data, can only sort of guess, but it should be something like what I have in a bunch of my Quick Measures like Time Intelligence the Hard Way:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

You will also probably want Quarter:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Quarter/m-p/391541

 

Otherwise, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanka greg aleays appreciate the positive feedback

Hi @Anonymous,

 

It's not a good idea to add the sales amount as columns in the Date table. I would suggest you use measures instead. Please try these DAX functions. totalytd-function-daxtotalqtd-function-dax.

 

 

Best Regards,
Dale

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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