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
Anonymous
Not applicable

Prevent spliting when using LYTD (pbix attached)

I have this pbix : https://drive.google.com/file/d/1tpGKvL_ST1L7YgDkDFqqLqfKb0FEjfcL/view?usp=sharing

 

I have a single selection filter on Year, and when I select 2021:

ovonel_0-1632382263676.png

 

 

My goal is to never split a given Customer on Type, so, when I show the totals, I want to see: Net Revenue LYTD as 54 but in Locale, not in Inter:

 

 

ovonel_1-1632382310373.png

 

I cannot harcode it... Many clients can belong to the same type.

 

Also a client changing 'type' can happen with more than one client in the future (or different type names). The only good thing is: if they switch, they do it on 01-Jan.

3 REPLIES 3
BeaBF
Super User
Super User

@Anonymous If you want to see all the totals only on the "Local" type, why do you put the other types in key?

The purpose of your request is not clear to me.

Could you show the expected result and what you fail to do?

 

B.

Anonymous
Not applicable

Thanks for your answer @BeaBF ,

 

My expected output is:

(when 2021 is selected):

ovonel_0-1632395680358.png

 

 

When 2020 is selected... it should work as it is already working:

ovonel_1-1632395705237.png

 

This measure gets your example result.

It first builds a table of Revenue LYTD for each inscope customer ignoring Type, then aggregates for the final result.

 

Net Revenue LYTD = 
VAR _CustomerLYTD = 
ADDCOLUMNS(
    VALUES(Revenue[Customer]),
    "@LYTD", CALCULATE([Net Revenue YTD], SAMEPERIODLASTYEAR('Date'[Date]), REMOVEFILTERS('Type') )
)
VAR _Result = SUMX(_CustomerLYTD, [@LYTD])
RETURN
    _Result

 

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.