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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Dear All,
I got a salesman outlet visit data as MTD which is accumulated daily. How could I create new column or use DAX formula for salesman outlet daily visit? (calculation is outlet_visit_MTD(day n) minus outlet_visit_MTD(day n-1) by salesman) Here is example of the data below. I got the data from the 1st 3 columns and wish to create the 4th column.
Thank you in advanced!
Solved! Go to Solution.
Pay attention to the situation that there are gaps between dates.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
hi @iteety ,
you may try to add a calculated column like:
Daily2 =
VAR _yyyymmdd = [yyyymmdd]
VAR _mtdpre =
CALCULATE(
MAX(data[MTD]),
ALLEXCEPT(data, data[SalesKey]),
data[yyyymmdd]< _yyyymmdd
)
RETURN [MTD]-_mtdpre
or
Daily3 =
VAR _yyyymmdd = [yyyymmdd]
VAR _saleskey = [saleskey]
VAR _mtdpre =
MAXX(
FILTER(
data,
data[saleskey]=_saleskey
&&data[yyyymmdd]<_yyyymmdd
),
data[MTD]
)
RETURN
[MTD] - _mtdpre
they worked like:
Pay attention to the situation that there are gaps between dates.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |