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
FARSANA97
New Member

Data Visualization

FARSANA97_0-1683840346216.png

I need to get difference between harvest date and the date selected in date slicer and classify them into 1-30 days, 31-60 days, and more than 60 days and bring that as columns as in the format I have given. I am able to find difference between date selected in the date slicer and harvest date by introducing measure, but since measure can't be taken as columns or axis in graph I am not satisfying my requirement, How can I achieve it?

1 REPLY 1
amitchandak
Super User
Super User

@FARSANA97 ,

Try following measures assuming you already have a measure Value Measure

 

Datediff = datediff(max(Table[Harvest date]), selectedvalue(date[Date]), day)

 

0-30 days= sumx(Values(Table[Harvest date]), if([Datediff] <=30 , [Value Measure], blank() ) )

 

31-60 days= sumx(Values(Table[Harvest date]), if([Datediff] >30  && [Datediff]  <= 60, [Value Measure], blank() ) )

 

If not you can do dynamic Segmentation on datediff

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

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

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.