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

Dividing two columns in matrix visualization

Hi there

I hope that you can help me. I have a data set and i need to know the difference between the 2 column in a matrix visualization, i need it to look like this -

 

Nov-18Dec-18Difference
102111
1514-1
7103
65-1
330

 

There is also a MonthY filter for this visualization so that the consumer can add the new month and remove the month that is not required. This will only be a two month Comparison, however the consumers might need to go back to get history. All the values are in one column in the data tables.

 

Any help will be greatly appreciated

Gazz

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Dividing two columns in matrix visualization

Hi Stachu

 

I will create a date table and try the solution that you suggusted. 

I will come back to you once i have tried it.

 

Thanx again.

Gazz

View solution in original post

4 REPLIES 4
Highlighted
Super User I
Super User I

Re: Dividing two columns in matrix visualization

can you share how the underlying table looks like? Also, do you have a separate date table in your model, or do you take it from the fact table?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: Dividing two columns in matrix visualization

Thanx for coming back to me, Stachu.

The date i am taking directly from the fact table, due to size constraints. and as you can see from the below screen shot i have added Day, month, Year Month Name and MonthY using Dax formulas.

 

Data.PNG

Highlighted
Super User I
Super User I

Re: Dividing two columns in matrix visualization

having a separate date table will actually save space and allow you to you use built in time itnelligence, cause for each date you store Year, month etc. only once and not per each row of your dataset, see here:

https://docs.microsoft.com/en-us/power-bi/desktop-date-tables

can you also explain how the MonthY filter would work in this case?

Right now I see 2 possible solutions:

1) you will need a table that would have a column that would have all possible months listed as well as the "Difference" label,
2) you can create a generic FirstMonth/Second Month Measures that would be filtered by MonthY slicers and then have 3rd measure Difference that would calculate variance between the 2



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: Dividing two columns in matrix visualization

Hi Stachu

 

I will create a date table and try the solution that you suggusted. 

I will come back to you once i have tried it.

 

Thanx again.

Gazz

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors