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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Raj341
Frequent Visitor

How to display the records of ytd, qtd, mtd etc., based on parameter date selection

Hi Everyone,
I have data with dates, category and values. now i need to show the values based on parameter selection.

Raj341_1-1715583982650.png

To get the results of currentday(Today), I am getting the correct results based on the parameter selection.
Formula, which i used to get the results.
-----------------------------------------------------------------
Today =
var _date = SELECTEDVALUE(date[Dates])
var _today = CALCULATE(SUM(Table[Value]),FILTER(Table,Table[Dates] = _date))
RETURN
_today
----------------------------------------------------------------------

--date --> parameter
--Dates --> column
If i execute the similar formula for yesterday, results showing blanks and for one "category" showing previous date as different date.

Raj341_0-1715583892318.png

I need to show the similar results for Today, Yesterday, Same period last year, week to date, month to date, Quarter to date
same period last year to date, Year to date.

TodayYesterdaySame period last yearWeek to dateMonth to dateQuarter to datesply QTDYTDsply YTD

 

Results should be like this, Category is like a,b,c etc.,

Raj341_0-1715598300326.png

Please help me . I am unable to fix the issue
@v-yueyunzh-msft  @RasCZ 
it will be a great help for me

 

2 REPLIES 2
Raj341
Frequent Visitor

@_AAndrade 
I am unable to upload powerbi file. data is like almost similar to the image

_AAndrade
Super User
Super User

Hi @Raj341,

Could you please share your pbix with same data so I take a look?





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.