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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Rajeeb701
New Member

Matrix table in Power BI

Hi ,

 

I have attached 02 screenshots .. one is rawdata, second one is output view.

In output page need to add two slicer (Report date 01 and report date 02) user can select those data according to selection date should be visible in table.. 

if let me know if any confusion ..

 

 

PBIView.jpgRawData.jpg

1 ACCEPTED SOLUTION
v-zhangtin-msft
Community Support
Community Support

Hi, @Rajeeb701 

 

You can try the following methods.

The first step is also, to select the first four columns-Unpivot Other Columns.

vzhangtinmsft_0-1724141496884.png

Dates can be made into slicers.

vzhangtinmsft_1-1724141533722.png

Measure = 
Var _mindate=CALCULATE(MIN('Table'[Report date]),ALLEXCEPT('Table','Table'[Report date])) 
Var _maxdate=CALCULATE(MAX('Table'[Report date]),ALLEXCEPT('Table','Table'[Report date]))    
Var _min=CALCULATE(MAX('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Head Property],'Table'[Property],'Table'[Demise Reference],'Table'[Attribute]),[Report date]=_mindate))
Var _max=CALCULATE(MAX('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Head Property],'Table'[Property],'Table'[Demise Reference],'Table'[Attribute]),[Report date]=_maxdate))
Return
IF(_min=_max,TRUE(),FALSE())
Result = IF(HASONEVALUE('Table'[Report date]),SELECTEDVALUE('Table'[Value]),[Measure])

Result:

vzhangtinmsft_2-1724141616335.png

Is this the result you expected?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-zhangtin-msft
Community Support
Community Support

Hi, @Rajeeb701 

 

You can try the following methods.

The first step is also, to select the first four columns-Unpivot Other Columns.

vzhangtinmsft_0-1724141496884.png

Dates can be made into slicers.

vzhangtinmsft_1-1724141533722.png

Measure = 
Var _mindate=CALCULATE(MIN('Table'[Report date]),ALLEXCEPT('Table','Table'[Report date])) 
Var _maxdate=CALCULATE(MAX('Table'[Report date]),ALLEXCEPT('Table','Table'[Report date]))    
Var _min=CALCULATE(MAX('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Head Property],'Table'[Property],'Table'[Demise Reference],'Table'[Attribute]),[Report date]=_mindate))
Var _max=CALCULATE(MAX('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Head Property],'Table'[Property],'Table'[Demise Reference],'Table'[Attribute]),[Report date]=_maxdate))
Return
IF(_min=_max,TRUE(),FALSE())
Result = IF(HASONEVALUE('Table'[Report date]),SELECTEDVALUE('Table'[Value]),[Measure])

Result:

vzhangtinmsft_2-1724141616335.png

Is this the result you expected?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks...

Ashish_Mathur
Super User
Super User

Hi,

In Power Query, right click on the first 4 columns and select "Unpivot Other Columns".  Create a Calendar Table and build a relationship from the Date column of the Fact table to the Calendar Table.  Drag and drop date from the Calendar Table to the Column well of a matrix visual.  Create a Date slicer from the Calendar table and select 2 dates.  Write this measure

Measure = calculate(max(Data[Value]),datesbetween(calendar[date],max(calendar[date]),max(calendar[date])))=calculate(max(Data[Value]),datesbetween(calendar[date],min(calendar[date]),min(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
BernatAgulloMVP
Most Valuable Professional
Most Valuable Professional

What is the question? 

Hi,

I need a view as similar as output screenshot which I attached .

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!

December 2024

A Year in Review - December 2024

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