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
ArquimedesP
Helper I
Helper I

Need Help with measure

Hi guys, i have a table wiht this columns:

 

FechaAtrasos2Atrasos3Capital_MN
30/9/201855478
31/10/201940409821
30/11/201956568425
31/12/20198787478
31/1/20201001000
28/2/20205002000
31/3/20201050
28/4/2020120700
31/10/202020800
30/11/2020101550
31/1/20211001205
28/2/2021600600200
30/4/20212020355

 

Atrasos2: They are the days behind without taking into account the covid issue.

Atrasos3: It is a calculated column where if the dates are between 31/01/2020 and 31/01/2021 (covid issue), the days of arrears are zeroed.

 

I also have this measure:

 

SUMAPRODUCTO CARTERA = SUMX(VW_Cartera,VW_Cartera[Atrasos2]*VW_Cartera[Capital_MN])/SUM(VW_Cartera[Capital_MN])
 
I want to create this filter:
 
ArquimedesP_0-1622660933219.png
 
And even I need the measure to calculate with the column "Atrasos2" when I select "Normal" or do not select anything, and to calculate with the column "Atrasos3" when I select "Covid".
 
 
How should i do it?
 
Thanks

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@ArquimedesP 

Use the measure given below:

SUMAPRODUCTO CARTERA =
VAR __V =
    SELECTEDVALUE ( Table[VAlue], "Normal" )
RETURN
    DIVIDE (
        SUMX (
            VW_Cartera,
            IF (
                __v = "Covid",
                VW_Cartera[Atrasos3] * VW_Cartera[Capital_MN],
                VW_Cartera[Atrasos2] * VW_Cartera[Capital_MN]
            )
        ),
        SUM ( VW_Cartera[Capital_MN] )
    )



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
ArquimedesP
Helper I
Helper I

it worked perfectly! Thanks a lot!

Fowmy
Super User
Super User

@ArquimedesP 

Use the measure given below:

SUMAPRODUCTO CARTERA =
VAR __V =
    SELECTEDVALUE ( Table[VAlue], "Normal" )
RETURN
    DIVIDE (
        SUMX (
            VW_Cartera,
            IF (
                __v = "Covid",
                VW_Cartera[Atrasos3] * VW_Cartera[Capital_MN],
                VW_Cartera[Atrasos2] * VW_Cartera[Capital_MN]
            )
        ),
        SUM ( VW_Cartera[Capital_MN] )
    )



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.