Forum Discussion

Chipsnump's avatar
Chipsnump
Icon for Advocate I rankAdvocate I
2 years ago
Solved

Card shows 0 value No filter applying IF Statement Measure

Hi,

I am creating the payment under the condition of minimun sales threshold with IF statement. The logic itself, is fine, but I would like to present the total payment in card without any filter applied.  As you see from below, without filter, it shows 0 as the total value, while showing a correct value when selected a specific shop. 

.

 

I tried both in order to test it, but it shows the same result which is 0 with no filter on.

Measure1:

Trusted_F =
VAR Ther_1 = 75000
VAR Ther_2 = 100000

VAR Ther_3 = 150000
RETURN
IF( [## Actual QTD] >= Ther_1 && [## Actual QTD] < Ther_2 , VALUE("1500") ,
IF( [## Actual QTD] >= Ther_2 && [## Actual QTD] <= Ther_3 , VALUE("2250") , "0"))

 

Measure2:

Trusted_F =
VAR Ther_1 = 75000
VAR Ther_2 = 100000

VAR Ther_3 = 150000
RETURN
IF( [## Actual QTD] >= Ther_1 && [## Actual QTD] < Ther_2 , 1500) ,
IF( [## Actual QTD] >= Ther_2 && [## Actual QTD] <= Ther_3 , 2250) , 0))


please advice.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Chipsnump 

     

    Here I create a measure:

    MEASURE =
    VAR _vtable =
        SUMMARIZE (
            'Custoemr',
            'Custoemr'[Group Name_2],
            "_ActSales", [Actual_Sales],
            "_Crteria", [Criteria 1]
        )
    RETURN
        SUMX ( _vtable, [_Crteria] )
    

    Add it into a card, the result is as follow:

     

    Best Regards

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

  • Hi,

    I do not know what result you want.  Furthermore, when i opened the file, i got 10,000 as the answer in the card visual (not a 0).  Anyways, drag this measure to the table and card visual

    Measure = SUMX(VALUES(Custoemr[Group Name_2]),[Criteria 1])

    Hope this helps.

     

  • I made it, thank you so much for your kind support and advice 🙂

     

11 Replies

    • Chipsnump's avatar
      Chipsnump
      Icon for Advocate I rankAdvocate I

      Hi, 

      Thank you for your reply.

       

      It's not about no impact filter to the table or the matrix. But I actually would like to set a default of Card Visualization to be total amount of this measure instead of "0". I believe that the card may retreive this measure as the text rather than number, so that's why it represents either 0 or the maximum value from this measure.

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Chipsnump 

         

        I speculate that the problem could be caused by the measure: [## Actual QTD].

        Could you please let me check how this measure is written, that could be more careful to solve your problem.

         

        Best Regards

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