Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello friends,
I need to build a measure that calculates the number of months in the context of CalendarTable (disconnected)
So, if a user filters on a year - it will return 12, if a user filters on a quater, then - 3, month - 1
Please help with the logic
Thanks
Michael
Solved! Go to Solution.
Hi @Anonymous,
I need to build a measure that calculates the number of months in the context of CalendarTable (disconnected)
So, if a user filters on a year - it will return 12, if a user filters on a quater, then - 3, month - 1
Do you mean the "Year", "Quarter" and "Month" column you're using as Slicers/Filters are from a different table(not the Calendar table)? Could you post some sample data for this table?
What if a user just filters on a month without selecting a specific Year or Quarter? Could you be more precisely with the logic you want to calculate the number of months? ![]()
Regards
Hi @Anonymous,
I need to build a measure that calculates the number of months in the context of CalendarTable (disconnected)
So, if a user filters on a year - it will return 12, if a user filters on a quater, then - 3, month - 1
Do you mean the "Year", "Quarter" and "Month" column you're using as Slicers/Filters are from a different table(not the Calendar table)? Could you post some sample data for this table?
What if a user just filters on a month without selecting a specific Year or Quarter? Could you be more precisely with the logic you want to calculate the number of months? ![]()
Regards
Thank you @v-ljerr-msft
I have just realized that I can use a simple DISTINCTCOUNT(CalendarTable[YearMonth]) since it is not connected to Fact
Thanks :)!
Michael
Hi Micheal,
Please refer to the below blogpost by Rob collie oon Disconnected tables in Time calculations.
@BhaveshPatel Thanks, but it doesn't reffer to my question.
I know how to create a disconnected time dimension.
I am asking for help on how to calculate a number of months.
So I need help with the logic for this specific measure.
Thank you!
Michael
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.