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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
mamunxv8
Helper I
Helper I

Date Wise Data Show

Screenshot_2.png

Hi,

 

I want to make a table like that. The problem is that I can't show the data with column-wise date. I don't want any calculation here; I want to show the last two entry date data.  Can I do it on Power BI?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Thanks for the help. I found out different ways to set two days parallel. Also, as I want, find out the last two days from the dataset.

 

Here is Dax formula:

LastDayData =
VAR MaxDate = CALCULATE(MAX('Tablename'[Date]), ALL('Tablename'[Date]))
RETURN
CALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = MaxDate)
 
SecondLastDayData =
VAR SecondLastDate = CALCULATE(MAX('Tablename'[Date]), FILTER(ALL('Tablename'[Date]), 'Tablename'[Date] < MAX('Tablename'[Date])))
RETURN
CALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = SecondLastDate)
 
Thanks

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @mamunxv8 ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Thanks for the help. I found out different ways to set two days parallel. Also, as I want, find out the last two days from the dataset.

 

Here is Dax formula:

LastDayData =
VAR MaxDate = CALCULATE(MAX('Tablename'[Date]), ALL('Tablename'[Date]))
RETURN
CALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = MaxDate)
 
SecondLastDayData =
VAR SecondLastDate = CALCULATE(MAX('Tablename'[Date]), FILTER(ALL('Tablename'[Date]), 'Tablename'[Date] < MAX('Tablename'[Date])))
RETURN
CALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = SecondLastDate)
 
Thanks
mamunxv8
Helper I
Helper I

Screenshot_4.png

 

Thanks for your help. Here is the sample data set. Your assumption is correct. There are so many dates, and I only want to show the last two dates on the report. How can I do it using power query?

 

I also tried to make a matrix table, but it shows like that....

 

Screenshot_5.png

 

 

Thanks

 

Hi, 

I created a sample which gives output as below:

 

mahenkj2_0-1699706142143.png

Please find a demo file here. I have used multiple power query transformations here, you need to test if it works in your scenarion. Please ask questions as may be needed to clarify.

 

https://drive.google.com/file/d/1AAcvPL3QSCT6C5-F2BmClDE_KWy8Elio/view?usp=sharing

 

Hope it helps.

Thank you

Thanks for your help. Actually, i want to show the table data without any calculation. Just like the images. Please see the data 03-oct-23 and 02-oct-23. I want to show them separately on two columns without any calculation. 

Screenshot_2.png

If you need need the data set please take a look below. I only want to show close value on the report.

 

Screenshot_4.png

As your last solution i also want to use Matrix table but i can't do it. Please take a look in below

 

Screenshot_5.png

 

Thanks again

mahenkj2
Solution Sage
Solution Sage

Hi @mamunxv8 

 

I believe you can.

We can't see your table data, so assuming that your date column have many dates and you want to use a matrix visual and keep dates in column header but only last two dates. If so, you can use filter in power query to filter top 2 rows or so to keep 2 latest dates and then use that column in a matrix visual.

 

Hope it helps.

 

You can share sample data incase need more help.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors