Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I'm trying to write a measure that sums up the entire column based on a user picking a date on a slicer.
This is what I have so far:
CalculatePastDue = CALCULATE(SUM(Invoice[AmtUSD]),FILTER(Invoice,Invoice[PaidDate] <= RELATED(DateTable[Date])))
However, it's not summing the total of the column. It's only summing up the value for that one particular date.
Solved! Go to Solution.
@Anonymous wrote:
Thank you for replying. For some reason it's adding a lot more values (6.8 M). I added the data table into the original question for a frame of reference.
@Anonymous
What is the date column in the slicer? @Vvelarde's DAX shall work based on my test. Alternatively, you can create a measure as simple as sumTotal = SUM(Invoice[AmtUSD]) and use "BEFORE" in the slicer. See attached pbix file.
For further suggestion, please post upload the pbix file. You can upload it to Onedrive/GoogleDrive and share the download link. Do remember to mask sensitive data before uploading.
Hi,
Create a relationship from the PaidDate column in the Invoice table to the Date column in the DateTable table. In the visual, drag the Date column from the DateTable table. Now try this formula
=CALCULATE(SUM(Invoice[AmtUSD]),FILTER(Invoice,Invoice[PaidDate] <= MAX(DateTable[Date])))
Hope this helps.
@Anonymous
Hi try with this:
CalculatePastDue = CALCULATE(SUM(Invoice[AmtUSD]),FILTER(All(Invoice),Invoice[PaidDate] <= SELECTEDVALUE(DateTable[Date])))
Regards
Victor
Lima -peru
Thank you for replying. For some reason it's adding a lot more values (6.8 M). I added the data table into the original question for a frame of reference.
@Anonymous wrote:
Thank you for replying. For some reason it's adding a lot more values (6.8 M). I added the data table into the original question for a frame of reference.
@Anonymous
What is the date column in the slicer? @Vvelarde's DAX shall work based on my test. Alternatively, you can create a measure as simple as sumTotal = SUM(Invoice[AmtUSD]) and use "BEFORE" in the slicer. See attached pbix file.
For further suggestion, please post upload the pbix file. You can upload it to Onedrive/GoogleDrive and share the download link. Do remember to mask sensitive data before uploading.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 32 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |