Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Meagan
Super User
Super User

Create attribute for week/month/quarter to use with multiple measures in matrix

I'm trying to recreate this table in Power BI: 

I have measures for lost customer, inactive customer, and new customer. I also have measures for lost customer - week, lost customer - month, lost customer - quarter, inactive customer - week, inactive customer - month, inactive customer - quarter, etc. Based upon the date in the visual filter, the first column should return the total for the selected week, selected month, and selected quarter. 

 

I'm creating reports in the web service and trying to find a creative way to create this chart (made in Excel) in Power BI. There is no One Drive for Business or SharePoint team site available so I can't just pin the chart from Excel to my Power BI dashboard.

 

I tried multi-row cards, but the lack of ability to control the number of items and the truncation of category labels makes it a poor option. I tried creating one table per row, but it leaves way to much white space when I pin the tables to a dashboard.

 

I'm hoping there is some creative DAX (maybe a disconnected table?) that I could create to make the week/month/quarter values into a single attribute by which I could then filter my measures. But I'm not seeing how that is possible. 

1 ACCEPTED SOLUTION
Meagan
Super User
Super User

I ended up solving my own problem and blogged about it here. I already had the date table and the base measures. So I added a disconnected table that would let me put the metrics in an atrribute so they could go on rows. Then I added some calculated measures to use the disconnected table. I made one measure for weekly, one for monthly, and one for quarterly and placed them in Values.  

 

I think Power BI should be able to accomodate putting measures on rows in a matrix. Please vote for this feature request here

View solution in original post

3 REPLIES 3
Meagan
Super User
Super User

I ended up solving my own problem and blogged about it here. I already had the date table and the base measures. So I added a disconnected table that would let me put the metrics in an atrribute so they could go on rows. Then I added some calculated measures to use the disconnected table. I made one measure for weekly, one for monthly, and one for quarterly and placed them in Values.  

 

I think Power BI should be able to accomodate putting measures on rows in a matrix. Please vote for this feature request here

fbrossard
Advocate V
Advocate V

What kind of aggregation do you want ? Week-To-Date, Month-To-Date, Quarter-To_Date) ?

I think it should be nice to create a rich time dimension a create calculated measures on it.

To generate a Time Dimension with Power Query you can use this 

 

You can also modify the script to enrich you time dimension by adding relative attributes (relative week (W0, W-1 ....), relative months, blablabla,....), here are some references :

 

Greg_Deckler
Super User
Super User

Any chance you can post some sample data? Is the "selected date" a date-based slicer for example, so something like "1/6/2016" or is it something else? I guess that is the main question. I am assuming that in your customer table, you have a date field as to when that customer was lost, went inactive or became a new customer.

 

I would think that a matrix coupled with some custom columns/measures should be able to get you what you want but I need a little more information.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors