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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
askkumar
Frequent Visitor

Column grand total on each row of matrix visual

Hello Experts

 

I am building the Matrix visual, where I have the date column and all dates will be displayed in rows in table.

 

2023-08-26
2023-08-27
2023-08-28

 

Now I want to add another column that gives me max of date in each row

 

2023-08-262023-08-28
2023-08-272023-08-28
2023-08-282023-08-28

 

Tried different measures using max, but unfortunatley unable to get in desired format.

 

Any help is appretiated

4 REPLIES 4
askkumar
Frequent Visitor

Thanks experts for the answers, sorry for the late reply.

 

I have achieved this by using all solutions, my visuals has more than 10 columns and all these columns are affecting the max value.

 

Hence I achieved by exlcuding some columns from calculation and then taking max and then comparing with max date in dataset then filtered the rows.

 

var Max_Date_Selected = CALCULATE(MAX(Query1[DATE]),ALLSELECTED(Query1[DATE]))
var Max_date = MAXX(FILTER(Query1,Query1[DATE] = Max_Date_Selected),Query1[DATE])
var Max_Date_Visual = CALCULATE(MAX(Query1[DATE]),ALLEXCEPT(Query1,Query1[DATE],Query1[col1],Query1[col2],Query1[col3]))
return
IF(Max_date = Max_Date_Visual,1,0)
 
 
mh2587
Super User
Super User

MAX_DATE = MAXX(ALL(Dates),MAX(Dates[Date]))
--Try this one


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Anonymous
Not applicable

Hi! 

Do you have an example of a measure yout tried or can you gives us more context of the filtering context? 

For example, if you create a column in your table with the formula:

max_date = MAX('Calendar'[Date])

This gives the maximum value of the column "Date" in my Calendar.  

 

You can then add this column to your visual 

 

LMK if this helps

Greg_Deckler
Super User
Super User

@askkumar Try something like: MAXX( ALL('Table'), [Date])



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.