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
admin11
Memorable Member
Memorable Member

How to add period @ YTD table ?

Hi All

I have a YTD chart , The title now indicate as SALES BY BRAND_C.

i like to know how to add the period , so that it can reflect the period. 

As now when i send a image of YTD table , it does not indicate the period.

I aware that not easy task , hope some one can offer an solution that is think out of box.

admin11_0-1620094418585.png

My PBI file :-

https://www.dropbox.com/s/k8x9wig50k49lid/PBT_V2021_400_SI_TA.pbix?dl=0

 

Paul

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi @admin11  ,


You could create a measure by the following formula:

YTD DATE =
var _max = MAX('Date'[Date])
var _min = MIN('Date'[Date])
var _a=format(_min, "MMM-YYYY") & " to " & format(_max, "MMM-YYYY") & " SALES BY BRAND_C"
return IF(ISFILTERED('Date'[Date]),_a,format(TODAY(), "MMM-YYYY"))

Then add title text

v-yalanwu-msft_3-1620350130248.jpeg

The final output is shown below:

v-yalanwu-msft_4-1620350134064.pngv-yalanwu-msft_5-1620350139012.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi @admin11  ,


You could create a measure by the following formula:

YTD DATE =
var _max = MAX('Date'[Date])
var _min = MIN('Date'[Date])
var _a=format(_min, "MMM-YYYY") & " to " & format(_max, "MMM-YYYY") & " SALES BY BRAND_C"
return IF(ISFILTERED('Date'[Date]),_a,format(TODAY(), "MMM-YYYY"))

Then add title text

v-yalanwu-msft_3-1620350130248.jpeg

The final output is shown below:

v-yalanwu-msft_4-1620350134064.pngv-yalanwu-msft_5-1620350139012.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-yalanwu-msft 

Thank you very much for your help.

Paul

amitchandak
Super User
Super User

@admin11 , a new measure like

 

measure =
var _max = maxx(allselected('Date1'), 'Date1'[Date])
var _min = minx(allselected('Date'), 'Date'[Date])

return format(_min, "MMM-YYYY") & " to " & format(_max, "MMM-YYYY") & " SALES BY BRAND_C"

@amitchandak 

 

The measure is working fine , except that it display Dec , may i know how to make it display May ?

The reason is for the YTD expression , i don't select any date , it now is May , i need it display May , if now is June , i need it display June.

 

admin11_0-1620097217798.png

 

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.