Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

First date with another color

Good morning,

 

I have a table of items with values and I want to make a chart that shows me the values of the first date with another color. Can you help me?

 

Example:

ITEM    DATA        VALUE

   A       1/1/2021    10

   A      15/2/2021    2

   A      15/3/2021    3

   B       1/2/2021     5

   B       14/4/2021   1

   B       15/5/2021   2

 

 

Thanks,

3 Replies

  • Hi, Anonymous 

    Please check the below picture and the sample pbix file's link down below.

     

     

    First Date Value total Measure =
    CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( 'Table', DAY ( 'Table'[Date] ) = 1 )
    )
     
     
    NOT First Date Value total Measure =
    CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( 'Table', DAY ( 'Table'[Date] ) <> 1 )
    )
     
     
     
     
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      I'm sorry but the first day could be different from 1. It could be any day of the year.