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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Azar503
Regular Visitor

Need help for DAX measure

Hi,

I need help in calculatind date measure.
I have Date Slicer that takes up dates From and To.
Ex - From 3/Sep/2019 To - 3/Sep/2021


1. Calculate the no of years for the given Date Range
No of Months is 48 and when divided by 12 it is 4 (no of years)

Ex:
FromToNo of MonthSplit
01-Sep-1930-Sep-23484


Expected Out Put in matrix
NameSep-19-sep  20Sep-20 to sep 21Sep-21 to sep 22Sep-22 to sep 23
A23203533
b34403445
c44505540
d34254450



If the To Date is 31 0ct 23, we need the column header to show in months in Last column as highligted.

NameSep-19-sep 20Sep-20 tosep 21Sep-21 to sep 22Sep-22 to sep 2331-Oct-23
A2320353333
b3440344545
c4450554040
d3425445050

Row : Name
Column: Date it will be split accordingly by selected Date filters.
Vales : Sales amount

Please help me to achieve this requirement.


Thanks and Regards,
Azar.

------------------------------
Mohamed Azarudeen.

------------------------------
 
 

 

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @Azar503 

Not quite sure what you need, can you explain more specifically the logic of the measure you need to create? Please provide your original data sheet for research.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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