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
Ash1
Frequent Visitor

Sum of values per server, for the latest date available

Hello,

 

I'm trying to create a similar chart as we create on Pivot chart on Excel. Can someone help me with the dax for it.

 

ServerDatecategoryvalue
A5/4/2017bike10
A5/3/2017car20
A5/2/2017Bus30
B5/4/2017bike20
B5/3/2017car30
B5/2/2017Bus20
C5/4/2017bike40
C5/3/2017car50
C5/2/2017Bus60

 

What I'm looking for is 

sum of values per server, for the latest date available. If I select multiple servers, powerbi should show me categories per server as  side by side bar chart

 

here is how the output should looking like. Unfortunately I cannot copy the image so I'm pasting the pivottable from Excel

 

Date5/4/2017
  
Row LabelsSum of value
A10
bike10
B20
bike20
C40
bike40
Grand Total70

 

 

Here is the DAX I'm using but however when I select multiple servers, instead of showing seperate values for each servers, it is adding up all the values 

 

Measure = CALCULATE (SUM(values), FILTER(Table, Table[date] = MAX(Table[date])))

 

Note: The reason, I'm using max date is that I have data for every hour. 

 

1 REPLY 1
spuder
Resolver IV
Resolver IV

Hi Ash1,

 

when I use the new Matrix Visual. The result without DAX is as follows.

 

You can add the date column as a Filter (or if wished in the Column part of the matrix.

 

example.jpg

 

 

 

If you don't want to manually filter the date. There is another way.

 

You can use the date column in the visual filter level. Choose Filter Type Top N and use last date.

 

Unfortunately it is German language but it should be similar in yours.

 

example.jpg

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.