Forum Discussion
Breakdown by quarter
Hi community,
I got a simple model with a fact table, a dimension table and a calendar
I'd like to achieve the breakdown by quarter within each year like in the table below:
How do you calculate the Measure on column 3?
Many thanks
Sax
I figured this out - the right measure to use is
QuarterBreakdown =
VAR YearSales =
SUMX (
VALUES ( 'Calendar'[Year] ),
CALCULATE ( [1. Total Sales], ALLSELECTED ( 'Calendar' ) )
)
RETURN
DIVIDE ( [1. Total Sales], YearSales )
3 Replies
- SykResident Rockstar
What do you want the measure in column 3 to show or do?
- SaxHelper I
I figured this out - the right measure to use is
QuarterBreakdown =
VAR YearSales =
SUMX (
VALUES ( 'Calendar'[Year] ),
CALCULATE ( [1. Total Sales], ALLSELECTED ( 'Calendar' ) )
)
RETURN
DIVIDE ( [1. Total Sales], YearSales )