Forum Discussion

Antonio_Gomez's avatar
Antonio_Gomez
Resolver I
4 years ago
Solved

Error in card with weeks

  Hi everyone!   I'm having this issue. When I put a range of dates for some dates the text shown in the cards is correct but for others not.   The Power Query Editor is Ok, I have:   A colum...
  • Signore_Ands's avatar
    Signore_Ands
    4 years ago

    Hola Antonio_Gomez 

    You'll need to use a measure then to display the correct First and Last Values. See below.  Hopefuly this solves it finally for you.

    I've created two measures:

     

    Semana-Año Primero =
    VAR vUltima = MAX(Calendar_Months[calendar_dt])
    VAR vPrimero = MIN(Calendar_Months[calendar_dt])

    RETURN
    "Semana " & FORMAT(WEEKNUM(vPrimero),"0#") & "/" & YEAR(vPrimero)
     
    Semana-Año Ultima =
     
    VAR vUltima = MAX(Calendar_Months[calendar_dt])
    VAR vPrimero = MIN(Calendar_Months[calendar_dt])

    RETURN
    "Semana " & FORMAT(WEEKNUM(vUltima),"0#") & "/" & YEAR(vUltima)