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
arun90
Helper I
Helper I

How to get opening date

my data has 3 dates(01-01-2023,02-01-2023,03-01-2023) in row but user select slicer in date between (02-01-2023 to 03-01-2023) then 01-01-2023 has to show 'opening' else 02-01-2023, 03-01-2023 in power bi

1 ACCEPTED SOLUTION

pls see the attachment below

11.PNG

 

Appreciate your kudos. if my solution is helpful, pls mark it as an accepted solution. Thanks





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

34 REPLIES 34

@ryan_mayuand one thing, my actual data doesn't have continuous dates.

pls update the sample data and expected output. you can directly paste the sample data in the reply





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu 

 

i attached the real time data sample and output 

arun90_1-1709782303785.pngarun90_2-1709782337909.png

 

@arun90 

create a table which contains continous days.

Table 3 = CALENDAR(min('Table'[Opening date]),max('Table'[Opening date]))
 
then get the recqty and issueqty data from orignial table
issueqty = RELATED('Table'[issueqty])
Recqty = RELATED('Table'[Recqty])
 
then do the similar work on the new table to get the expected output
11.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu 

 

Some dates are showing null recodes but that date no need to show for this filter

arun90_1-1709802553413.png

 

 

arun90_0-1709802465778.png

 

pls see the attachment below

11.PNG

 

Appreciate your kudos. if my solution is helpful, pls mark it as an accepted solution. Thanks





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu 

Thanks for your support i will check and confirm with you.

@ryan_mayu my real data exp for opening=(

Opening1 = if('STOCKVALUE'[DOCDATE]=min('STOCKVALUE'[DOCDATE]),STOCKVALUE[recqty]-STOCKVALUE[issqty],sumx(FILTER('STOCKVALUE','STOCKVALUE'[DOCDATE]<EARLIER('STOCKVALUE'[DOCDATE])),STOCKVALUE[recqty])-sumx(FILTER('STOCKVALUE','STOCKVALUE'[DOCDATE]<EARLIER('STOCKVALUE'[DOCDATE])),STOCKVALUE[issqty])) 

)

 

open=

 if(MIN('STOCKVALUE'[DOCDATE])=MIN('Calander1'[Date])-1,sum(STOCKVALUE[Opening1]),0)  but not working this exp
 
arun90_0-1709725326910.png

 

@ryan_mayu Thank you so much ,i done a great job for me.i will work with my real data and get back to you.once again thank you.

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @arun90 ,

 

Going back to my question and basing on your screenshot, what date/dates are you expecting to appear in Opening Date column?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian 

If the document date is prior to January 31, 2024, the opening date column should display "Opening"; otherwise, it should display the dates between January 31, 2024, and March 5, 2024, as per the selected slicer period.

 

Thanks.

Hi @danextian

you have any update on this concept ?

 

 

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.