Forum Discussion

Marango's avatar
Marango
Regular Visitor
1 year ago
Solved

create measures with filters

Hello,

I need to create measures using some filter to be able to make some card visuals.

 

here is what I did:

I have my date base with all years information, so for making the "sales per year"  i made to measures:

2025 = SUM(...) and filtered in 2025 poryjected sales.
2024 =  CALCULATE([Facturación],SAMEPERIODLASTYEAR('Calendar'[Date])) - I created a measure of get the sales of previous year.
 than I made a measure to get  the difference between both 2024 adn 2025 sales.
 
WHAT I SHOULD DO:

I made to charts one "increasing of sales" detailed all the "clientes" that has a positive result and I was using the filter panel. and another of "lost sales"  with all the negative results.

I need to add some cards to summarize the totals.

I have one showing the total of sales in 2025

I need a card showing the total of increaisng sales that is "2,066,314"

and a card showing the total of lost sales that is "-919,865"

 

thank you!

  • Anonymous's avatar
    Anonymous
    1 year ago

    Thank you lbendlin for your concern.

     

    Hi Marango ,

     

    Based on your description I created simple data:

     

    You can refer to the following measures to get positive and negative totals:

     

    increasing measure = CALCULATE([Measure],FILTER('Table',[Measure]>0))
    lost measure = CALCULATE([Measure],FILTER('Table',[Measure]<0))

     

     

    Result:

     

    Best Regards,
    Zhu

     

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

2 Replies