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
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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 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.

Top Solution Authors