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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
MarceloVieira
Helper II
Helper II

[ Doubt about how to have similar result on powerquery ]

Hello everyone, is there a way to have a similar result direct on powerquery?

 

 

 

FT_OVERDUE_24 = -- THIS IS A CALCULATED TABLE
FILTER(
    ALL( FT_OVERDUE ),
    VAR YEARMONTH_OVERDUE = FT_OVERDUE[YEARMONTH_SEQUENTIAL_OVER]
    RETURN
        FT_OVERDUE[YEARMONTH_SEQUENTIAL_OVER] = YEARMONTH_OVERDUE &&
        FT_OVERDUE[YEARMONTH_SEQUENTIAL_DUE] >= YEARMONTH_OVERDUE - 23 &&
        FT_OVERDUE[YEARMONTH_SEQUENTIAL_DUE] <= YEARMONTH_OVERDUE
)

 

 

This image is on aggregated level. The fact table is on a client granularity.

MarceloVieira_0-1708605342841.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MarceloVieira ,

 

Please follow these steps:

Based on your description, I created the data:

vkaiyuemsft_0-1708677275268.png

1.Create custom columns in the power query editor and write expressions:

if

[due] >= [over] - 23 and [due] <= [over]

then

"1"

else

"0"

             

vkaiyuemsft_1-1708677275271.png

2.Filter the new column, only retain the value of "1" data.

vkaiyuemsft_2-1708677351933.png

3.After getting the desired data, delete the newly created custom column.

vkaiyuemsft_3-1708677351935.png

4.If you want to group the YEARMONTH_SEQUENTIAL_OVER column, you can refer to the documentation: How to GROUP BY or summarize rows - Power Query | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MarceloVieira ,

 

Please follow these steps:

Based on your description, I created the data:

vkaiyuemsft_0-1708677275268.png

1.Create custom columns in the power query editor and write expressions:

if

[due] >= [over] - 23 and [due] <= [over]

then

"1"

else

"0"

             

vkaiyuemsft_1-1708677275271.png

2.Filter the new column, only retain the value of "1" data.

vkaiyuemsft_2-1708677351933.png

3.After getting the desired data, delete the newly created custom column.

vkaiyuemsft_3-1708677351935.png

4.If you want to group the YEARMONTH_SEQUENTIAL_OVER column, you can refer to the documentation: How to GROUP BY or summarize rows - Power Query | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thks @Anonymous 

 

The solution works very well!!! Really thks for the help!!

MarceloVieira_0-1708694956972.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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