cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GianVita
Frequent Visitor

min and max year sum

Hello everyone,

 

I need help with two measures in a Matrix visualization, would appreciate so much if anyone could give me a hand. Ive got a matrix visualization that shows the sum of sales of two years (max and min), one measure for each year used on the value field of the matrix. In rows i have a month name variable, i created from a dates table that is linked with the sales table, in the rows of the matrix. The thing is when in a row (month) there are values (sales) for one year but not the other, it will show the value on both years. How i know there is only values for one year in that month? Because of a graph that does not have this measures but instead just the sum of sales over month with years in the legend, picture of this below in the post. Last but not least, i added two cards that show me both min and max years, to make sure my measures are calculating on the right years. Does anyone know how i can fix this? 

 

The table is in picture 1). Variables used in the matrix are in picture 2). Measures i use in the table are in picture 3).  The graph that shows correct data is in picture 4)

1)

GianVita_0-1685043695139.png

 

2)

GianVita_1-1685041937963.png

3)

GianVita_2-1685042001664.pngGianVita_3-1685042014225.png

4)

GianVita_4-1685042724224.png

 

Thank you all,

Kind regards.

 

 

1 ACCEPTED SOLUTION
GianVita
Frequent Visitor

I solved it.
Changed the measures like this:

GianVita_0-1685108630322.pngGianVita_1-1685108651580.pngGianVita_2-1685108668543.png

This was the expected outcome. 
Anexado[RUT] and Anexado[AÑO] are filters in my report.

Hope it helps. 

View solution in original post

2 REPLIES 2
GianVita
Frequent Visitor

I solved it.
Changed the measures like this:

GianVita_0-1685108630322.pngGianVita_1-1685108651580.pngGianVita_2-1685108668543.png

This was the expected outcome. 
Anexado[RUT] and Anexado[AÑO] are filters in my report.

Hope it helps. 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors