Forum Discussion

AlwaysThinking's avatar
AlwaysThinking
Frequent Visitor
3 years ago
Solved

Filter Supreme

Hello,

 

I need to filter by 9 different measures. Each measure is created off of a seperate date field.

The measures are created like: 

Test due/not due = IF(TODAY()>=[Date+6months] && MAXX('table1',[date]) <> BLANK(), "Due", IF(MAXX('Table1',[Date])=BLANK(), "Unknown",
 IF(TODAY()<[+6 months] && TODAY()>=[+6 months]-30, "Approaching", "Not Due")))
 
I need to be able to have a slicer that "combines" all nine measures to where I can filter by Due, Approaching, or Not Due. Please help!
 
Thanks in advance!
 
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi AlwaysThinking ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) We have nine measures.

    such as : [Test due/not due] [Test due/not due2]....[Test due/not due9]

    (2)We can create a table.

    Table = {"Due","Not Due","Approaching"}

    (3) We can create nine measures. 

    Measure1 = 
    var _slicer=SELECTEDVALUE('Table'[Value])
    
    var _a= CALCULATE('Table1'[Test due/not due],FILTER(ALLSELECTED('Table1'),'Table1'[Test due/not due]=_slicer))
    return 
    IF(_a="Unknown",BLANK(),_a)
    Measure2 = 
    var _slicer=SELECTEDVALUE('Table'[Value])
    
    var _a= CALCULATE('Table1'[Test due/not due2],FILTER(ALLSELECTED('Table1'),'Table1'[Test due/not due2]=_slicer))
    return 
    IF(_a="Unknown",BLANK(),_a)

    ......

    (4) Then the result is as follows.

     

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AlwaysThinking ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) We have nine measures.

    such as : [Test due/not due] [Test due/not due2]....[Test due/not due9]

    (2)We can create a table.

    Table = {"Due","Not Due","Approaching"}

    (3) We can create nine measures. 

    Measure1 = 
    var _slicer=SELECTEDVALUE('Table'[Value])
    
    var _a= CALCULATE('Table1'[Test due/not due],FILTER(ALLSELECTED('Table1'),'Table1'[Test due/not due]=_slicer))
    return 
    IF(_a="Unknown",BLANK(),_a)
    Measure2 = 
    var _slicer=SELECTEDVALUE('Table'[Value])
    
    var _a= CALCULATE('Table1'[Test due/not due2],FILTER(ALLSELECTED('Table1'),'Table1'[Test due/not due2]=_slicer))
    return 
    IF(_a="Unknown",BLANK(),_a)

    ......

    (4) Then the result is as follows.

     

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

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