Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there, I am new to powerbi and struggling with this. From the table I have added 'Country' as Rows and 'Year' as column. I am trying to add a column next to 2023, showing % change in 2023 and 2022. I request help with this, as I am not able to figure this out on my own. Please!
Solved! Go to Solution.
Hi @v-nuoc-msft - Thanks for your suggestion. But I am still not able to achilve what I looking for. Let me rephrase my question, maybe I was not very clear previously.. I really appreciate your help!
This is how my raw data looks like, with more rows:
Month | READER LOCATION | Reads |
Jan-20 | Canada | 1,293,579 |
Jan-20 | United States | 1,253,969 |
Jan-20 | India | 353,493 |
Feb-20 | France | 349,513 |
Mar-20 | United Kingdom | 289,964 |
Jan-21 | Australia | 181,488 |
Jan-22 | Brazil | 130,479 |
Jan-23 | South Africa | 77,071 |
and this is what I want to achieve in one of my dashboards:
Hi @jasmeet_ia
@Greg_Deckler Good share!
For your question, here is the method I provided:
Here's some dummy data
"Data"
You can create a measure to calculate the year over year change in price.
Measure =
var current_year = SELECTEDVALUE('Data'[2023])
var last_year = SELECTEDVALUE('Data'[2022])
RETURN DIVIDE(current_year - last_year, last_year)
Change the format of measure to “%”
Here is the result
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-nuoc-msft - Thanks for your suggestion. But I am still not able to achilve what I looking for. Let me rephrase my question, maybe I was not very clear previously.. I really appreciate your help!
This is how my raw data looks like, with more rows:
Month | READER LOCATION | Reads |
Jan-20 | Canada | 1,293,579 |
Jan-20 | United States | 1,253,969 |
Jan-20 | India | 353,493 |
Feb-20 | France | 349,513 |
Mar-20 | United Kingdom | 289,964 |
Jan-21 | Australia | 181,488 |
Jan-22 | Brazil | 130,479 |
Jan-23 | South Africa | 77,071 |
and this is what I want to achieve in one of my dashboards:
@jasmeet_ia You can create a PY measure like this:
NC Intenet Sales (PY) =
VAR __MinPYDate = MIN('Dates'[Prior Year Date])
VAR __MaxPYDate = MAX('Dates'[Prior Year Date])
VAR __PYCalendar = CALENDAR(__MinPYDate, __MaxPYDate)
VAR __Table =
SUMMARIZE(
ALL('FactInternetSales'),
'FactInternetSales'[OrderDate],
"__Sales", SUM('FactInternetSales'[SalesAmount]))
VAR __Result = SUMX( FILTER( __Table, [OrderDate] IN __PYCalendar), [__Sales] )
RETURN
__Result
This may also help, You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
26 | |
22 | |
13 | |
8 |
User | Count |
---|---|
75 | |
50 | |
47 | |
17 | |
17 |