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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
manojsv19
Regular Visitor

DAX measure to show the rolling total for each month based on column values in a matrix visual

Hello All,

 

I have a requiremet to show the count of old meter and new meter in a single matrix. Old meter count will be decreasing  and new meter count will be increasing on daily basis.  I am using direct query and not storing any data inside Power BI. Data from table itself coming as rolling total on daily basis (Sample data from the table provided below).

 

I wanted to display the min of old count and max of new count on monthly basis as shown below. Example for the month of october in matrxi, Count of old meter is 9000 and new meter is 2000. In november, Old meter is 5000 and new meter is 6000. Expected output is provided below.

 

I am facing challenges in creating a DAX measure to show the old and new count as metioned in matrix visual. I would appreciate any suggestions/input in showing the old and new count in a matrix.

 

Data from Input table

DateOld Meter CountNew Meter Count
10/20/2019100001000
10/21/201990002000
11/5/201985002500
11/10/201975003500
11/12/201950006000
12/1/201940007000
12/15/201920009000
12/20/2019100010000

 

 

Expected Output

MetersOctNov Dec
Old Meter Count900050001000
New Meter Count2000600010000

 

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @manojsv19 

try new table

NewTable = summarize('Table1';Table1[Date].[Month];"Old Meter Count";min('Table1'[Old Meter Count]);"New Meter Count";MAX('Table1'[New Meter Count]))

are sure you need output exactly as you showed above? it will not be so easy 🙂

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi,

 

Thank you for the inputs!!

 

Yes, my requirement is to show the output as provided in the example and am using direct query. I wanted to get the summarize count from the query and don't want to do the aggregration at Power BI.

 

Let me konw for any additional information.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors