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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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