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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
manar_alamri
Helper I
Helper I

Adding new column for the total target

Hi,

I faced an issue and I will happy if I get a help from you.

I want to add new column contains the total target.

 

My table name is Daily_targets

I have here a column with the Retail targets data 

 

manar_alamri_0-1707299494562.png

 

 the daily_targets table has a relationship with Sales table (this table appearing daily sales). the relationship by (column date_branchcode) column

relation.png

 

I  configured slicers like this to show the data untill today and it is work correctly in Target TD 

 

 

manar_alamri_8-1706863240548.png

 

I want to add another column with name ( Total targe) which contain the total retail target data based on the slicer selection

EX: if I select QTD > the data for this column will be the whole retail targets for this quarter

if we in Feb month , the total target column will show jan - feb - mar targets.

 

I tried many things but the data still apparing QTD (until today).

How I can fixed that to make the data shows all the current Quarter? 

 

manar_alamri_6-1706862963351.png

 

same thing in other filters (MTD, YTD)

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@manar_alamri , The target should not join with sales, both should join with a common dimension like date. You can create QTD, YTD measures using TI and switch them using calculation groups or field parameters 

 

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@manar_alamri , The target should not join with sales, both should join with a common dimension like date. You can create QTD, YTD measures using TI and switch them using calculation groups or field parameters 

 

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors