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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Yonah
Helper II
Helper II

Measure Including Year Filter

Hi,
i have done a Measure to get the Revenue from TOP N Products.
N depends on the selected Value from my TOP-N Table (It's containing just the numbers from 1 to 10).
 In the same Measure, I also calculate how much was the revenue of all Products how were not in the selected Top N.
The Code for this is:

Top N Produktbez Sum DB3 =
VAR TopNSelected =
    SELECTEDVALUE ( 'TOP N-Filter'[TOP N] )
VAR TopNProdbezTable =
    TOPN ( TopNSelectedALLSELECTED ( 'Pseudo Produkbez Table' ), [DB3] )
VAR TopNProdbez =
    CALCULATE ( [DB3], KEEPFILTERS ( TopNProdbezTable ) )
VAR OtherSales =
    CALCULATE ( [DB3], ALLSELECTED ( 'Pseudo Produkbez Table' ) )
        CALCULATE ( [DB3], TopNProdbezTable )
VAR CurrentProd =
    SELECTEDVALUE ( 'Pseudo Produkbez Table'[Produktbezeichnung] )
RETURN
    IF ( CurrentProd <> "Others"TopNProdbezOtherSales )


Now I want to add Year as Filter.
I'm using the Year coming from the Date Hierarchy.
Unfortunately, I can't provide a sample yet.
If a sample is need, I will try to create own.

1 REPLY 1
v-janeyg-msft
Community Support
Community Support

Hi, @Yonah 

 

Yes, A sample is needed. Without data and context it's hard to tell where to put the year. Please share it.

 

Best Regards,
Community Support Team _ Janey

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.