Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi
Need help to calculate the percentage differnce bwtween dates, with refrence to the Happy% column in the table. And based on increase or decarese need to show a visual if it's dropped or increased.
Thanks
Solved! Go to Solution.
Hi @ganeshnr073
You can achieve this by creating a calculated column
PercentageDifference =
VAR CurrentRowDate = 'YourTable'[Date]
VAR PreviousRowDate =
CALCULATE(
MAX('YourTable'[Date]),
FILTER('YourTable', 'YourTable'[Date] < CurrentRowDate)
)
VAR CurrentRowHappy = 'YourTable'[Happy%]
VAR PreviousRowHappy =
CALCULATE(
MAX('YourTable'[Happy%]),
FILTER('YourTable', 'YourTable'[Date] = PreviousRowDate)
)
RETURN
IF(
ISBLANK(PreviousRowHappy),
BLANK(),
DIVIDE(CurrentRowHappy - PreviousRowHappy, PreviousRowHappy)
)
Thn create a other column
Change =
SWITCH(
TRUE(),
'YourTable'[PercentageDifference] > 0, "Increased",
'YourTable'[PercentageDifference] < 0, "Decreased",
"No Change"
)
This formula uses the SWITCH function to categorize the percentage difference as "Increased" if it's greater than 0, "Decreased" if it's less than 0, and "No Change" if it's 0
Thank you. Hope this will help
Hi @ganeshnr073
You can achieve this by creating a calculated column
PercentageDifference =
VAR CurrentRowDate = 'YourTable'[Date]
VAR PreviousRowDate =
CALCULATE(
MAX('YourTable'[Date]),
FILTER('YourTable', 'YourTable'[Date] < CurrentRowDate)
)
VAR CurrentRowHappy = 'YourTable'[Happy%]
VAR PreviousRowHappy =
CALCULATE(
MAX('YourTable'[Happy%]),
FILTER('YourTable', 'YourTable'[Date] = PreviousRowDate)
)
RETURN
IF(
ISBLANK(PreviousRowHappy),
BLANK(),
DIVIDE(CurrentRowHappy - PreviousRowHappy, PreviousRowHappy)
)
Thn create a other column
Change =
SWITCH(
TRUE(),
'YourTable'[PercentageDifference] > 0, "Increased",
'YourTable'[PercentageDifference] < 0, "Decreased",
"No Change"
)
This formula uses the SWITCH function to categorize the percentage difference as "Increased" if it's greater than 0, "Decreased" if it's less than 0, and "No Change" if it's 0
Thank you. Hope this will help
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |