Forum Discussion
Azar503
5 years agoRegular Visitor
Need help for DAX measure
Hi,
Ex:
Expected Out Put in matrix
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.
------------------------------
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)
No of Months is 48 and when divided by 12 it is 4 (no of years)
Ex:
| From | To | No of Month | Split |
| 01-Sep-19 | 30-Sep-23 | 48 | 4 |
Expected Out Put in matrix
| Name | Sep-19-sep 20 | Sep-20 to sep 21 | Sep-21 to sep 22 | Sep-22 to sep 23 |
| A | 23 | 20 | 35 | 33 |
| b | 34 | 40 | 34 | 45 |
| c | 44 | 50 | 55 | 40 |
| d | 34 | 25 | 44 | 50 |
If the To Date is 31 0ct 23, we need the column header to show in months in Last column as highligted.
| Name | Sep-19-sep 20 | Sep-20 tosep 21 | Sep-21 to sep 22 | Sep-22 to sep 23 | 31-Oct-23 |
| A | 23 | 20 | 35 | 33 | 33 |
| b | 34 | 40 | 34 | 45 | 45 |
| c | 44 | 50 | 55 | 40 | 40 |
| d | 34 | 25 | 44 | 50 | 50 |
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
- v-easonf-msft
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