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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Danielktn
Frequent Visitor

Add an ittem to the current filter

Hi, 

I have a report where I filter for a month all the financial info for example may comparing it with the previous year.

 

temp.png

I want to make a bridge graphic between current year and the previous one. I got it.

temp.png

My problem is that i want to compare in the middle of both orange columns with the situation of december 2019 but as I have filtered the table with march I can not. I would need to add to the context the month of december as well as the one filtered with the slicer. 

Any ideas? I guess there is a simple way but I dont find it.

Thanks!

 

 
 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Danielktn ,

 

Please check:

 

1. Enter data.

DataTypeWithDIC:

enter data.PNG

 

2. Sort column.

sort.jpg

 

3. Create a measure.

Measure =
SWITCH (
    MAX ( DataTypeWithDIC[Data Type With DIC] ),
    "R19", CALCULATE ( SUM ( Tabla1[k€] ), Tabla1[Data Type] = "R19" ),
    "R20", CALCULATE ( SUM ( Tabla1[k€] ), Tabla1[Data Type] = "R20" ),
    "DIC19", CALCULATE (
        SUM ( Tabla1[k€] ),
        FILTER (
            ALLEXCEPT ( Tabla1, Tabla1[Concepto] ),
            Tabla1[Data Type with dec] = "DIC19"
        )
    )
)

 

4. Create visual.

visual.jpg

 

5. Test.

test.gif

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Danielktn ,

 

Please check:

 

1. Enter data.

DataTypeWithDIC:

enter data.PNG

 

2. Sort column.

sort.jpg

 

3. Create a measure.

Measure =
SWITCH (
    MAX ( DataTypeWithDIC[Data Type With DIC] ),
    "R19", CALCULATE ( SUM ( Tabla1[k€] ), Tabla1[Data Type] = "R19" ),
    "R20", CALCULATE ( SUM ( Tabla1[k€] ), Tabla1[Data Type] = "R20" ),
    "DIC19", CALCULATE (
        SUM ( Tabla1[k€] ),
        FILTER (
            ALLEXCEPT ( Tabla1, Tabla1[Concepto] ),
            Tabla1[Data Type with dec] = "DIC19"
        )
    )
)

 

4. Create visual.

visual.jpg

 

5. Test.

test.gif

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks it works perfect!

Icey
Community Support
Community Support

Hi @Danielktn ,

 

Please share me a dummy PBIX file, removing sensitive information, for test. And show me the expected results.

 

 

Best Regards,

Icey

Hi,

thanks a lot,

Please find the Dummy file with the explanations inside.

File 

KR

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.