Forum Discussion
Need help with DAX
Hi everyone, I am in a situation. the screen shot below is in excel, i have all the measures except for the ones in the red rectange. I am fighiting to get a way to calcualte this in powerbi.
the YOY in excel is calculated as =SUM(K8/K3)-1
Quaterly YOY is calculated as =(SUM(K8:M8)/SUM(K3:M3))-1
YTD/YTG is calculated as =(SUM(K8:M8)/SUM(K3:M3))-1.
Any help is appreciated
13 Replies
- femcoldtFrequent Visitor
HI Anonymous Xiaoxin,
FInd attached a sample PBIX file from this link Master.pbix with some random dataset about my thoutght process.
I want to to the first three month in the year for F24 Act + Fcst divided by F24 Actual whihc is Jan to March and so on.
Thanks
- Ashish_MathurSuper User
Hi,
Share some dummy data in an Excel file and on another tab, show the expected results with your formulas. I will try to translate those Excel formulas in the DAX language. Share only as much data as is required to get those 3 calculations.
- femcoldtFrequent Visitor
- AnonymousNot applicable
Hi femcoldt ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
BTW, power bi did not exist row and column index, so you can't simply calculate across multiple fields or to accurately calculate on specific cells. You need to use different field as filter to limit the calculate ranges. (notice: recursion calculation not supported in Dax)
Regards,
Xiaoxin Sheng