Forum Discussion
Matrix table in Power BI
- Anonymous2 years ago
Hi, Rajeeb701
You can try the following methods.
The first step is also, to select the first four columns-Unpivot Other Columns.
Dates can be made into slicers.
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:
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.
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.