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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

(%) days of the fiscal period and not the month

Hi,

 

I have trouble to create a simple metric that calculates the number of days we are in the fiscal period - because i want an indication on how much (%) of time we have until the end of the period. This is because a fiscal period does not represent a typical calender month - for example, the fiscal period could start in 25th of june and end in 19th of juli. I have a date-table that has actual dates, fiscal year, fiscal period, fiscal year - fiscal period (e.g. 2020-02). However, I dont seem to solve it with a simple DATEDIFF function. Any know how to approach this issue? Many thanks,

 

Herman

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous Time intelligence functions likely won't work for a non-standard calendar. So, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008

 

Otherwise, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Many thanks! This helped a lot!

Greg_Deckler
Super User
Super User

@Anonymous Time intelligence functions likely won't work for a non-standard calendar. So, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008

 

Otherwise, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
aj1973
Community Champion
Community Champion

Hi @Anonymous 

It sounds like you didn't add a Calendar date to your model, did you? your actual date table doesn't contain the days does it?

 

DATEDIFF  is a time intelligent function therefore it needs a Calendar table and to get the number of days you also need date in days in your Calendar Table.

 

A Sample Pibx will help more to solve your issue.

 

Regards 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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