Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Measure Performance in Bar Chart

Hi All,

 

I have a measure that use the sum of a few measures and performance wise it is perfectly fine on it's own.

The problem begins when I try to display the measure in a line and clustered column chart. I'm trying to display the data by date with a category as the legend but this causes the performance of the measure to go from milliseconds to load to over 20 seconds.

The measure is this below.
The Datetime column is in half hourly and divided by 48 to show the number of periods in a day. Please let me know if you need any more information.

Net Revenue_per_KW (adj) = IFERROR(([Net Revenue Total]/(COUNT(DATE_Table[DateTime])/48)*365/[Asset Capacity (kW)]),0)

Thanks in advance,

Mike
  • Avoid nesting measures (remember each of them carries their own CALCULATE baggage).  Write your code verbatim.  Use DIVIDE rather than / 

  • Hi Anonymous ,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.

2 Replies

  • Avoid nesting measures (remember each of them carries their own CALCULATE baggage).  Write your code verbatim.  Use DIVIDE rather than / 

  • v-venuppu's avatar
    v-venuppu
    Community Support

    Hi Anonymous ,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.