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 everyone,
I have a case where, I would like to have a slicer where user can select "Quarter" and "Month" - and this will change the axis.
When selecting Quarter, then quarters in selected year are returned in charts, e.g. 2020Q1, 2020Q2, 2020Q3, 2020Q4 when 2020 is selected as Year.
I have 2 measures in my charts in the same page, SUM of something (e.g. Sales) and a SPLY measure.
My challenge is the SPLY measure. In my sample file, you can see SPLY results is wrong, e.g. if year = 2020, then SPLY results are presented in 2019.
Sample:
https://drive.google.com/file/d/14RqPnffz-gF64u2G4zdptP8nEugruiBo/view?usp=sharing
Hi @krikas
You need to create an additional table.
Write a query using selectcolumns to append quarter and month data and union them.
Post this use a treats fn for example - calculate(sales,treatas(values(from the newly appended field,quarter-year from your date table,treatas(values(from the newly appended field,month-year from your data table)
This will give you result.
Hi @Anonymous
Thanks a lot for your input. I have tried to implement your suggestion - without success.
Do you by any change have the time to show me how in my example?
Thanks.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |