Forum Discussion
nhol
Advocate II
8 years agoCompare and alert when data got changed
Hi, I need a solution for the following query: I have a daily dataset that on a regular basis don't change at all, however when the percentage of "CapitalPercent" between days are changing I ...
v-jiascu-msft
Microsoft Employee
8 years agoHi nhol,
If your mode is Direct Query to SQL Server, you can add a measure. You can make a little change to apply this measure to the non sequential dates.
Measure =
VAR lastdayQuantity =
CALCULATE (
SUM ( FactSales[SalesQuantity] ),
PREVIOUSDAY ( 'DimDate'[Datekey] )
)
VAR sumQuantity =
SUM ( FactSales[SalesQuantity] )
RETURN
IF (
ISBLANK ( lastdayQuantity ),
sumQuantity,
IF (
lastdayQuantity > sumQuantity,
CONCATENATE ( sumQuantity, UNICHAR ( 9660 ) ),
IF (
lastdayQuantity = sumQuantity,
sumQuantity,
CONCATENATE ( sumQuantity, UNICHAR ( 9650 ) )
)
)
)Best Regards,
Dale
nhol
Advocate II
8 years agoThe tweak you've suggested resulted in that if previousday of a specific date is BLANK then provide the VAR sumQuantity. However, this is not really the case. When the previousday is blank you need to compare the value to the last value that was given and look for a change there.
You suggestion is a good start to facilitate the requirement but is not complete.
If further info is needed I can provid it to you.
Best,
NH
- v-jiascu-msft8 years ago
Microsoft Employee
Hi nhol,
The formula I posted is just a demo. You need to make some changes. Please share you pbix file if you can.
Best Regards,
Dale