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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
wnicholl
Resolver II
Resolver II

Adding year to measure

Hello,

 

I need to add a year to the below formula. I tried to add; DATESBETWEEN('Calendar'[Date], DATE(2017,01,01), DATE(2017,31,12) to the formula however when I add as a value it can't display the visual. Is there something that I'm missing or is there another option to add dates?    

 

Count of Active Policy  =

DIVIDE(
    DISTINCTCOUNT('Policy'[Active Policy - Accnt ID]),
    DISTINCTCOUNT('Account'[Full_Account_ID__c])
)
2 ACCEPTED SOLUTIONS
Nathaniel_C
Super User
Super User

Hi @wnicholl ,
Please try this:

Your tables will need to be linked in the data model usually Calendar to Policy and Calendar to Account.

 

Count of Active Policy  =

CALCULATE(
DIVIDE(
    DISTINCTCOUNT('Policy'[Active Policy - Accnt ID]),
    DISTINCTCOUNT('Account'[Full_Account_ID__c])
)
FILTER(CALENDAR, CALENDAR[DATE]>= DATE(2017,01,01) && CALENDAR[DATE]<= DATE(2017,31,12)))




Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

Count of Active Policy  = calculate(DIVIDE(DISTINCTCOUNT('Policy'[Active Policy - Accnt ID]),DISTINCTCOUNT('Account'[Full_Account_ID__c])),DATESBETWEEN('Calendar'[Date]DATE(2017,01,01), DATE(2017,31,12))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

Count of Active Policy  = calculate(DIVIDE(DISTINCTCOUNT('Policy'[Active Policy - Accnt ID]),DISTINCTCOUNT('Account'[Full_Account_ID__c])),DATESBETWEEN('Calendar'[Date]DATE(2017,01,01), DATE(2017,31,12))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for your reply. You measure worked for me. 

Nathaniel_C
Super User
Super User

Hi @wnicholl ,
Please try this:

Your tables will need to be linked in the data model usually Calendar to Policy and Calendar to Account.

 

Count of Active Policy  =

CALCULATE(
DIVIDE(
    DISTINCTCOUNT('Policy'[Active Policy - Accnt ID]),
    DISTINCTCOUNT('Account'[Full_Account_ID__c])
)
FILTER(CALENDAR, CALENDAR[DATE]>= DATE(2017,01,01) && CALENDAR[DATE]<= DATE(2017,31,12)))




Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for your reply. You measure worked for me. 

Hi @wnicholl ,
You are welcome!

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Users online (238)