Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi everyone,
I really need your help to solve this. 😫 This is how my data look like:
I wish to sum each Username's Balance Amount that earlier than or equal to the Transaction Date. If using excel it would be look like this =SUMIFS(C:C,A:A,A2,B:B,"<="&B2)
I wish to find a dax formula that could replace this excel formula.
Thank you in advance!
Solved! Go to Solution.
@Sophiapan , Not very clear
Try a new column like
new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <earlier([Transaction Date])) , [New amount])
or use <=
new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <=earlier([Transaction Date])) , [New amount])
if this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Try:
Measure Name =
VAR SelectedDate = SELECTEDVALUE (Table[Transaction Date] )
RETURN
CALCULATE (
SUM (Table[Net Amount]),
Table[Transaction Date] <= SelectedDate
)
You can then use it in a table visual with username and transaction date.
If you want a calculated column in the table it's self let me know.
Try:
Measure Name =
VAR SelectedDate = SELECTEDVALUE (Table[Transaction Date] )
RETURN
CALCULATE (
SUM (Table[Net Amount]),
Table[Transaction Date] <= SelectedDate
)
You can then use it in a table visual with username and transaction date.
If you want a calculated column in the table it's self let me know.
@Sophiapan , Not very clear
Try a new column like
new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <earlier([Transaction Date])) , [New amount])
or use <=
new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <=earlier([Transaction Date])) , [New amount])
if this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 40 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |