Forum Discussion

Neal1988's avatar
Neal1988
Regular Visitor
5 years ago
Solved

Measure total in a Card Visual

i have the following measure that calulates the value for each row in a table visual.

 

RunRate =
VAR DayNoOfYear =
DATEDIFF(DATE(maxx(Points,Points[SurveyDateYear]),1,1), maxx(points,[StartDate]), DAY ) + 1

VAR DayNoOfYear2 =
DATEDIFF(DATE(
CALCULATE(maxx(Points,Points[SurveyDateYear]),ALLEXCEPT(Points,Points[SurveyDateYear],Points[Action]))
,1,1), NOW(), DAY ) + 1

VAR daydiff =
DayNoOfYear2-DayNoOfYear
RETURN

MROUND(
CALCULATE(
If(DayNoOfYear = 1, [Total],
([Total]/daydiff)*DayNoOfYear2
)
),0.5)
 
However, i need to get the total of this measure in a Card visual. 
 
Can anyone please advise if this is possible?
 
Thanks in advance!
  • I found the solution and it was to wrap a new measure in a Sumx(Summarize( which then gave the correct figures in a card.

3 Replies

  • Dhrubojit's avatar
    Dhrubojit
    Frequent Visitor

    Hi Neal  Please attach the sample data and PBIX , you can remove your confidential data and just give part of it . .so that we can analyze better . . because it depends on what your data is

    • Neal1988's avatar
      Neal1988
      Regular Visitor

      Hi, unfortunately all of it is confidential as we have a very strict privacy policy. 
      if you have any ideas that i could try, that would be appreciated.

       

      For a bit of context, i have a table visual and one column is a staff members start date and the messure above calculates whats their score would of been if they where employeed at the start of the year. and it's this column that i need totalled, and put into a card. 

       

  • Neal1988's avatar
    Neal1988
    Regular Visitor

    I found the solution and it was to wrap a new measure in a Sumx(Summarize( which then gave the correct figures in a card.