cancel
Showing results for
Did you mean:
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)

2)

3)

4)

Thank you all,

Kind regards.

1 ACCEPTED SOLUTION
Frequent Visitor

I solved it.
Changed the measures like this:

This was the expected outcome.

Hope it helps.

2 REPLIES 2
Frequent Visitor

I solved it.
Changed the measures like this:

This was the expected outcome.

Hope it helps.

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.