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
dsmitha
Responsive Resident
Responsive Resident

how to calculate ageing using DAX

Hi,

 

Request your guidance to solve this issue

I have a table which contains details of invoices,  my boss wants to calculate ageing of invoices, like if the invoice date is 7 days older then the colour of that row should change to amber, if invoice date is greater than 10 days then the colour of the row should change to red

kindly advice

 

regards,

dsmitha

1 ACCEPTED SOLUTION
ronaldbalza2023
Continued Contributor
Continued Contributor

Hi @dsmitha , hope you are having a great day. Sounds like a color formatting to me. Assuming that you already have dax for aging days. If wasn't, see here sample aging days measure Dynamic Grouping 

Aging Days Formatting =
SWITCH (
    TRUE (),
    [Aging Days] >= 7, "Amber", /*Check the hexcode for amber*/
    [Aging Days] >= 10, "Red", 
    BLANK ()
)

 

View solution in original post

2 REPLIES 2
ronaldbalza2023
Continued Contributor
Continued Contributor

Hi @dsmitha , hope you are having a great day. Sounds like a color formatting to me. Assuming that you already have dax for aging days. If wasn't, see here sample aging days measure Dynamic Grouping 

Aging Days Formatting =
SWITCH (
    TRUE (),
    [Aging Days] >= 7, "Amber", /*Check the hexcode for amber*/
    [Aging Days] >= 10, "Red", 
    BLANK ()
)

 

Hi ronaldbalza2023,
thank you for the quick and ultra simple solution,. it really helped me
thanks again
 
regards,
dsmitha
 
PREVIEW
 

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.