Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
Following is my sample data,
Product Date Amount
A 10-01-2020 1000
A 02-02-2020 500
A 21-03-2020 700
B 19-01-2020 500
B 11-02-2020 1500
B 23-03-2020 400
In my table visual i need these columns as follows and this my expected output,
Product Net Amount Balance
A 500 1500
B 1500 2000
In the report, i have selected range of date in between date slicer as from 01-02-2020 to 29-02-2020
Net Amount is the sum of Amount between the selected date range. But, Balance is the sum of amount from the start date (first non blank value in the date column ie..10-01-2020) to the selected max date (ie...29-02-2020) in the between date slicer.
I nedd a dax formula (measure) to calculate Balance of Amount.
Thanks in advance
Solved! Go to Solution.
@Anonymous , Try a measure like
calculate(sum(Table[Value]), filter(all(Table), Table[Product] = max(Table[Product])))
If date is coming from a date table joined to this
try like
calculate(sum(Table[Value]), all(Date))
Hi @Anonymous
Try these
Total Amount =
CALCULATE(
SUM(Amounts[Amount]),
VALUES('Calendar'[Date])
)
Product Total =
CALCULATE(
SUM(Amounts[Amount]),
FILTER(
ALL(Amounts[Product]),
Amounts[Product] = SELECTEDVALUE(Products[Product])
),
FILTER(
ALL('Calendar'[Date]),
'Calendar'[Date] <= MAX('Calendar'[Date])
)
)
Net Amount = [Product Total] - [Total Amount]
Results...
Hi @Anonymous
Try these
Total Amount =
CALCULATE(
SUM(Amounts[Amount]),
VALUES('Calendar'[Date])
)
Product Total =
CALCULATE(
SUM(Amounts[Amount]),
FILTER(
ALL(Amounts[Product]),
Amounts[Product] = SELECTEDVALUE(Products[Product])
),
FILTER(
ALL('Calendar'[Date]),
'Calendar'[Date] <= MAX('Calendar'[Date])
)
)
Net Amount = [Product Total] - [Total Amount]
Results...
Assumes you have both a date table and a master products table. You can download the pbix file here.
@Anonymous , Try a measure like
calculate(sum(Table[Value]), filter(all(Table), Table[Product] = max(Table[Product])))
If date is coming from a date table joined to this
try like
calculate(sum(Table[Value]), all(Date))
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |