The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Good Day.
I currently have two working measusres. The first shows total sales, and the second shows the total sales from the previous day:
Solved! Go to Solution.
I ended up resolving the problem. Instead of keeping a running tabular total, I directly targeted the KPI.
Using, variables, I was able to pull off what I needed:
MPreviousWeekDaySales =
VAR ThreeDaysRange = FILTER(AllDates,AllDates[Date] = TODAY() - 3)
VAR OneDayRange = FILTER(AllDates,AllDates[Date] = TODAY() - 1)
RETURN IF(WEEKDAY(TODAY()) = 2,SUMX(ThreeDaysRange,[MTotalSales]),SUMX(OneDayRange,[MTotalSales]))
I ended up resolving the problem. Instead of keeping a running tabular total, I directly targeted the KPI.
Using, variables, I was able to pull off what I needed:
MPreviousWeekDaySales =
VAR ThreeDaysRange = FILTER(AllDates,AllDates[Date] = TODAY() - 3)
VAR OneDayRange = FILTER(AllDates,AllDates[Date] = TODAY() - 1)
RETURN IF(WEEKDAY(TODAY()) = 2,SUMX(ThreeDaysRange,[MTotalSales]),SUMX(OneDayRange,[MTotalSales]))
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |