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
mussaenda
Super User
Super User

Aggregated Result based on Date Slicer

Hi,

 

If someone can help me, please.

I have these data for the advance payment:

 

Date Created      Date Received     Customer No    Control No       Debit     Credit       Amount

 31/01/2019         25/01/2019             C001              D19-001                       -1000         -1000       line1

 05/02/2019         25/01/2019             C001              D19-001          1000                           0           line2

 04/02/2019         30/01/2019             C002              D19-002                        -2000        -2000       line3

 08/02/2019         30/01/2019             C002              D19-002          2000                           0           line4

 01/03/2019         15/02/2019             C005              D19-003                        -3000        -3000       line5

 

 

Date Created: When we post the data

Date Received: When we receive the data

Customer No: Unique No for each customer

Control No: Document Series No

Debit: When we put it to the bank

Credit: When we received the the payment

Amount: On hand Total

 

I am required to show the following:

 

I have the selection of Date created (between)

Date Selection: 31/01/2019 - 04/02/2019

Expected Result:

Date Created      Date Received     Customer No    Control No         Amount

 31/01/2019         25/01/2019             C001              D19-001            -1000            line1

 

Date Selection: 31/01/2019 - 05/02/2019

Expected Result:*

Date Created      Date Received     Customer No    Control No            Amount

 04/02/2019         30/01/2019             C002              D19-002                -2000        line3

*The result is not showing line2 because we already sent it to the bank based on created date so it means it is not considered as advance anymore.

 

Date Selection: 31/01/2019 - 15/02/2019

Expected Result:**

Date Created      Date Received     Customer No    Control No            Amount

 

**Nothing shows here because we deposited all the advance payment to the bank based on the selection of the date

 

Date Selection: 31/01/2019 - 31/03/2019

Expected Result:***

Date Created      Date Received     Customer No    Control No            Amount

01/03/2019         15/02/2019             C005              D19-003                 -3000       line5

***Only this will show because this payment has no data yet that we sent it to the bank

 

Please let me know if there is any way. I have been stuck here for weeks now.

Your suggestions and detailed instructions will be highly appreciated.

Thank you,

 

Mia

1 ACCEPTED SOLUTION

Hi @mussaenda ,

The variable 'selected' is from 'date selection', please modify it to date table which you used to filter current table.
If you still confused how to use it, please share a pbix file with sample data for test.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @mussaenda ,

You can write a measure with all function to ignore current filter effect, then use selected value to filter whole table to do aggregated result.

Measure =
VAR selected =
    ALLSELECTED ( Table[Date] )
RETURN
    CALCULATE (
        SUM ( Table[Credit] ),
        FILTER (
            ALL ( Payment ),
            [Date created] >= MINX ( selected, [Date] )
                && [Date created] <= MAXX ( selected, [Date] )
        )
    )

Using ALLEXCEPT versus ALL and VALUES

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Sorry, I'm lost somewhere. If you can provide me a sample pbix. This will be a great help. Thank you

Thank you so much @v-shex-msft!

 

The Date we used for the VAR, is from?

I tried to use the creation date for this and it returns same total value for the same creation date

 

Thank you

Hi @mussaenda ,

The variable 'selected' is from 'date selection', please modify it to date table which you used to filter current table.
If you still confused how to use it, please share a pbix file with sample data for test.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.