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
rane19
Helper I
Helper I

How to apply value of TOTAL to every QUARTER for dividing (get % of) by every QUARTER TOTAL

Goal :

Repeating "Target" in every quarter compare to quarterly "Actual" by apply "Date.Quarter" Axis in cluster chart.

 

Problem :

Able to achieving "Target (value only 1row in Q1) vs Actual (every rows) %" in scoreard . But cannot apply of line chart with "Shared azis" by [Date].[Quarter]

 

# Table name : "data"

 

QuarterlyYearTargetActual
Q12020/01/01900200
Q22020/04/01 210
Q32020/09/01 205
Q42020/12/01 230
Q12021/02/01800203
Q22021/06/01 214
Q32021/08/01 220
Q42021/12/01 255

 

Image :

pbi_q.PNG

DAX 

Since REMOVEFILTERS() or VAR -- RETURN operation work against the filter of "Date.Quarter" Axis ,

no normal DAX expression I can find to manipulate the "Target" value to every quarter. 

Or the only way is prepare another data table from scracth  which duplibcate "Target" x 4 then match 4Q Date? (seems not productive )

1 ACCEPTED SOLUTION

@rane19 , Move target on last date of year nad you can use

CLOSINGBALANCEYEAR - as given in blog

 

Also this should work

This Year = CALCULATE(sum('Table'[Target]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))

 

prefer separate date/qtr year table

 

View solution in original post

3 REPLIES 3
rane19
Helper I
Helper I

@amitchandak  appreciate a lot definitely it is a great method but my bad for didn't obviously explain that my Goal is letting the Year Target repeatdly show in every quarter .(Different from the idea of "disturbute")  That you can imagine that 1 annual target show 4 times in the dataset of every quarter starting which quite illogical but that is my goal . I may have to process another separate dataset before import to Power BI which contain this illgoical shape to achieve the goal of this chart  .

@rane19 , Move target on last date of year nad you can use

CLOSINGBALANCEYEAR - as given in blog

 

Also this should work

This Year = CALCULATE(sum('Table'[Target]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))

 

prefer separate date/qtr year table

 

amitchandak
Super User
Super User

@rane19 , Seem like you have yearly target ,

 

Using date table you can distribute it in table or measure.

 

Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-C...

 

Distributing/Allocating the Yearly Target(Convert to Daily Target): https://community.powerbi.com/t5/Community-Blog/Distributing-Allocating-the-Yearly-Target-Convert-to...

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.