- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to calculate Number of month for in current year and Number of month for in current year+1
Hi All,
I need help in dax to calculate the below 3 steps as I already mention Date below as I have Year from 2019 to 2023
1. Number of months
2. Number of month for in current year
3.Number of month for in current year+1
Date |
1/12/2019 |
3/12/2020 |
3/1/2021 |
3/2/2021 |
3/3/2021 |
3/4/2021 |
1/12/2022 |
2/12/2022 |
3/1/2023 |
3/2/2023 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mdaamirkhan , Try a new
Best Create a new column
Month Year sort = FORMAT([Date],"yyyymm")
And they try a new measure like
Number of months= calculate(distinctCOUNT(Table[month year]))
Number of month for in current year= calculate(distinctCOUNT(Table[month year]), filter( Table, Year(Table[Date]) = year(Today())))
Number of month for in current year + 1= calculate(distinctCOUNT(Table[month year]), filter( Table, Year(Table[Date]) = year(Today())+1))
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview. ✨
️ November 12th-14th, 2024
Online Event
Register Here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forget to mention this one as well
Number of month for which contract is active since today
example we date and Active column where there in Yes and NO. How will I calculate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks it works and I forget to mention this one as well
Number of month for which contract is active since today
example we date and Active column where there in Yes and NO. How will I calculate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any idea on this Number of month for which contract is active since today
example we date and Active column where there in Yes and NO. How will I calculate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mdaamirkhan , Try a new
Best Create a new column
Month Year sort = FORMAT([Date],"yyyymm")
And they try a new measure like
Number of months= calculate(distinctCOUNT(Table[month year]))
Number of month for in current year= calculate(distinctCOUNT(Table[month year]), filter( Table, Year(Table[Date]) = year(Today())))
Number of month for in current year + 1= calculate(distinctCOUNT(Table[month year]), filter( Table, Year(Table[Date]) = year(Today())+1))
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview. ✨
️ November 12th-14th, 2024
Online Event
Register Here
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
06-07-2024 03:58 PM | |||
06-17-2024 11:53 AM | |||
06-11-2024 11:51 AM | |||
Anonymous
| 03-09-2023 09:39 AM | ||
07-21-2024 07:19 PM |
User | Count |
---|---|
113 | |
82 | |
45 | |
42 | |
28 |
User | Count |
---|---|
182 | |
82 | |
71 | |
48 | |
45 |