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 September 15. Request your voucher.
YoY =
Var visitp = CALCULATE(SUM('ga_goal_aggr_vw_1'[visits_count]),SAMEPERIODLASTYEAR('dm_behaviour_web_cal_source'[date]))
return
IFERROR((Divide((SUM('ga_goal_aggr_vw_1'[visits_count])-visitp),visitp)),0)
this measure i am writing for comparing this year and last year sales and need to subtraction of that, but above measure is working for only 2 days not more then that. please help me asap.
Hi @anjanikumar
The solution is usually to create two variables that capture last year's and current year's sales, and then subtract them.
we need information below to work on it further, could you provide it?
(1) a sample file, you can replace raw data with bogus data to protect your privacy.
or provide some sample data that fully covers your issue/question.
(2) give your expected result based on the sample you provide.
Kindly note: Please ensure the data in sample is concise and representative.
Thanks.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@anjanikumar , You need use date table to make sure time intelligence works
example
Year behind Sales = CALCULATE(SUM('ga_goal_aggr_vw_1'[visits_count]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM('ga_goal_aggr_vw_1'[visits_count]),SAMEPERIODLASTYEAR('Date'[Date]))
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
User | Count |
---|---|
13 | |
8 | |
8 | |
7 | |
5 |
User | Count |
---|---|
21 | |
15 | |
15 | |
10 | |
7 |