The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
I have a question about calculating the variance of facts from different columns.
An example, I want to calculate the variation percentage between january and february in each branch, and show the result in a third column.
I attach n example to illustrate my doubt.
Kind regards
Solved! Go to Solution.
Guess this will help you: CALCULATE Function (DAX)
In your case it will be something like:
test2 = (CALCULATE(SUM('Fact - Journals'[ACCOUNTED_AMOUNT]);'Dim - Period'[Fiscal Month] = "201709") - (CALCULATE(SUM('Fact - Journals'[ACCOUNTED_AMOUNT]);'Dim - Period'[Fiscal Month] = "201702")) ) / (CALCULATE(SUM('Fact - Journals'[ACCOUNTED_AMOUNT]);'Dim - Period'[Fiscal Month] = "201702")) * 100
Guess this will help you: CALCULATE Function (DAX)
In your case it will be something like:
test2 = (CALCULATE(SUM('Fact - Journals'[ACCOUNTED_AMOUNT]);'Dim - Period'[Fiscal Month] = "201709") - (CALCULATE(SUM('Fact - Journals'[ACCOUNTED_AMOUNT]);'Dim - Period'[Fiscal Month] = "201702")) ) / (CALCULATE(SUM('Fact - Journals'[ACCOUNTED_AMOUNT]);'Dim - Period'[Fiscal Month] = "201702")) * 100