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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Guyakobov
Helper II
Helper II

Column by chosen dates

pboproblem.pngHi, 

 

 I want to create a table based on the last 2 dates from the selected date filter.


If the filter is for the whole of September, then the table will show only the last 2 days 30.9 and 29.9.

Note that the values ​​in the table are yes according to the columns so that column 29.9 shows a sum of values ​​from 1.9-29.9
And a column of the 30.9 shows values ​​between 1-30.9

 

in the picture below you can see what I did in PBI and what I want it to be like the excel. 

 

Thanks for the help! 

 

 

 

 

4 REPLIES 4
Guyakobov
Helper II
Helper II

can someone help, please? 😞

 

 I need a column with the name of the last date that I choose, the value needs to be the sum of measure from the beginning of the period that was chosen until the last date.   

Hi, @Guyakobov 

As of now, it is difficult to create dynamic column headers affected by slicers  in a Matrix table.

You can check if  this related post  can help.

https://community.powerbi.com/t5/Desktop/Dynamic-column-header-in-Matrix/td-p/954608 

 

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@Guyakobov , Try a measure like


measure =
var _max =maxx(allselected(Date), Date[Date])
return
calculate([measure], filter(Date, date[date] >= _max-1, date[date]<=_max))

 

or

 

measure =
var _max =maxx(allselected(Date), Date[Date])
return
sumx(values(date[date]),if(max(date[date]) >= _max-1, max(date[date])<=_max , [meausre], blank()))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI, 

 

thank you for your reply! 

 

I tried it, but I can not use measures as in column in the matrix table. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.