Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

How to create a static measure in chart visual

Hello everyone. I'm trying to create a measure that isolates the value of another measure for a given month, and then replicates in all the rows, for all the other months.

 

To visualize, I have an example like this one:

 

Value is my measure that I created. Let's say right now I want to isolate the value for August and then replicate it in all the other months. I would like something like this:

 

And for that I tried: CALCULATE([Value],Table[Month]="August")

But I'm getting this as a result:

 

 

My measure only provides the desired value when the month is effectively August, but I want it to be static, independently of the month in every row. This is important because my measure is not a fixed value, so it will change and I need the value in every row.

 

Hope my explanation is clear enough. I attach an Example Excel file with the data.
https://docs.google.com/spreadsheets/d/1TP9itMhGOOtohsd1EwWgRVYofkPvDXrr/edit?usp=sharing&ouid=105742010702548206927&rtpof=true&sd=true

Thank you in advance!

 

 

4 Replies

  • Anonymous , try like, make sure the month is coming from table

     

    CALCULATE([Value],Filter(all(Table[Month]) , Table[Month]="August") )

     

    Ideally you measure should also work

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply. This is causing the same issue. It is zero in every row except from August. Can there be another possible solution?

      • grantsamborn's avatar
        grantsamborn
        Icon for Solution Sage rankSolution Sage

        Try this:

        Aug Total = 
        CALCULATE(
            SUM( 'DataTable'[Value] ),
            'DataTable'[Month] = "August"
        )
  • Hello,

    You have to remove the filters for each month then apply August as a filter.

    Value2 = CALCULATE([Value], REMOVEFILTERS([Month]), [Month] = "August")

    Image 1 has every month with value = MonthNumber then Image 2 is the second measure with all of them equal to 8