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
SriGaG1
Helper II
Helper II

How to get MTD ,QTD and YTD value using dynamic previous date?

Hi There Experts.

 

I am new to power BI ans still learning on how to use parameters to create a date range picker and to that I need to use these time intelligence functions. . So I did a research and first what I dis was, 

 

Step 1 - Creating a custom date table using the below  calc

Date = CALENDAR(DATE(2019,01,01),TODAY())
 
Step 2 - Creating another table with time intelligence functions
Date Period =
union(ADDCOLUMNS(DATESMTD('Date'[Date]),"Type","MTD", "Order","1"),
ADDCOLUMNS(DATESQTD('Date'[Date]),"Type","QTD", "Order","2"),
ADDCOLUMNS(DATESYTD('Date'[Date]),"Type","YTD", "Order","3"),
ADDCOLUMNS(CALENDAR(DATE(2019,01,01),TODAY()),"Type","All Time", "Order","4"))
 
And based on the above, i have created the slicer like this.
 
SriGaG1_1-1663101186251.png

 

The above date field shows the max date which is today. So when I clicked MTD on the above slicer, It works. All the details from Sep 1 - 13 will be taken and when I selected Sep 5, It is taking Sep 1 to Sep 5 data. So that is perfectly working.  So the issue arives when we selecting an older date. Lets say, 29th of August, entire visualization will get blank. But the output need to be 1st of Aug  -29th Aug. And qtd ,YTD values will change. and MTD button on the above pane will get dissapeared.

 

 MTD selection

SriGaG1_2-1663101470648.png

 

 

When selected an older date, MTD value will get dissapeared from the slicer. When we select 2021, Dec date, all MTD, QTD and YTD icons in the slicer will get dissapered.

SriGaG1_3-1663101662860.png

 

 

How to solve this issue? I need to use a separate table like above for time intelligence functions. And using the above date slicer is a must. Is there a way to solve this out please?

 

Hope you have understood my issue. Can anyone help me on this please?


 

 

4 REPLIES 4
v-mengzhu-msft
Community Support
Community Support

Hi @SriGaG1 ,

 

Perhaps I didn't understand your question very well. What do you want to achieve?
Can you send me a sample data or a pbix file without private data? Also, tell me what you want to achieve.

 

Best regards,

Community Support Team Selina zhu

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

Hello @v-mengzhu-msft 

 

Thank you for your comment. I have update the issue and you can find iton this link 

 

https://community.powerbi.com/t5/Desktop/Custom-Date-change-according-to-the-MTD-QTD-YTD-All-Time-sl...

 

Thank you very much..

 

 

SriGaG1
Helper II
Helper II

anyone can help?

SriGaG1
Helper II
Helper II

anyone can help?

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.