Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Solved! Go to Solution.
Based on the results you are showing, the column "Switch Logic" should equal "Switch" for all the records of year 2017. The column "technicalperiodcode" should be of type number and not text
Then the following DAX should get you the right results:
Measure =
SUMX (
SUMMARIZE (
Data,
Data[technicalyear],
Data[Switch Logic]
),
SWITCH (
[Switch Logic],
"Pre-Switch", CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
Data[Level4TransactionTypeDescription] = "Inward Estimated Premium"
) - CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
Data[Level4TransactionTypeDescription] = "Inward Unearned Premium Reserve"
),
"Post-Switch", CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
Data[Level4TransactionTypeDescription] = "Inward Booked Premium"
),
"Switch", CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
ALL ( Data ),
Data[technicalyear] <= EARLIER ( Data[technicalyear] ),
Data[Level4TransactionTypeDescription] = "Inward Booked Premium"
) - CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
ALL ( Data ),
Data[technicalyear] <= EARLIER ( Data[technicalyear] ),
Data[Level4TransactionTypeDescription] = "Inward Estimated Premium"
)
)
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Based on the results you are showing, the column "Switch Logic" should equal "Switch" for all the records of year 2017. The column "technicalperiodcode" should be of type number and not text
Then the following DAX should get you the right results:
Measure =
SUMX (
SUMMARIZE (
Data,
Data[technicalyear],
Data[Switch Logic]
),
SWITCH (
[Switch Logic],
"Pre-Switch", CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
Data[Level4TransactionTypeDescription] = "Inward Estimated Premium"
) - CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
Data[Level4TransactionTypeDescription] = "Inward Unearned Premium Reserve"
),
"Post-Switch", CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
Data[Level4TransactionTypeDescription] = "Inward Booked Premium"
),
"Switch", CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
ALL ( Data ),
Data[technicalyear] <= EARLIER ( Data[technicalyear] ),
Data[Level4TransactionTypeDescription] = "Inward Booked Premium"
) - CALCULATE (
SUM ( Data[AmountInReportingCurrency] ),
ALL ( Data ),
Data[technicalyear] <= EARLIER ( Data[technicalyear] ),
Data[Level4TransactionTypeDescription] = "Inward Estimated Premium"
)
)
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 54 | |
| 40 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 94 | |
| 83 | |
| 33 | |
| 32 | |
| 24 |