Forum Discussion

NILU090's avatar
NILU090
Icon for Helper II rankHelper II
3 years ago

Metrix expand and collaps

I have used Metrix in power bi. Input shows that metrix here.

When i collaps month should show output. Output will be based on latest date of that month's value ( as you can see highlited in green).

and when i expand the month, should show input there.

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi NILU090 

    You can refer to the following measure

    Sample data

     

     

    Measure = IF(ISINSCOPE('Table'[Month]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),'Table'[Month]=MAX('Table'[Month])))

     

     

     Output

    Best Regards!

    Yolo Zhu

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

     

  • NILU090 , Assume value is a measure

     

     

    Switch(true(),

    isinscope(Date[Date]), [Value] ,

    isinscope(Date[Month Year]),calculate([Value], lastdate(Date[Date]))

    )