Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello guys, I'm sure I'm doing something really wrong but I can't understand what it is exactly, I guess it's about context but I don't know...
I have a calendar table and I created a custom column (NombresSemanasGráficos) so I can rename the weeks to S-Actual (current week), S-1, S-2, S-3... to previous weeks and then I group "S-6 to S-10" and" S-11 to S-15" into both groups S-6-10 and S-11-15.
I want to show Average data for week for both groups of weeks (S-6-10 and S-11-15) and for the rest I want to sum data.
[suscrpciones nuevas] it's just a SUM of data.
So I made this measure:
TEST SEMANAS =
IF(
VALUES(Calendario[NombresSemanasGráficos])="S-6-10",
CALCULATE(
AVERAGEX(SUMMARIZE(Calendario, Calendario[Semana consecutiva], "Avg", [Suscripciones nuevas]), [Suscripciones nuevas]),
Calendario[ControlSemana]<=-6 && Calendario[ControlSemana]>=-10
),
IF(
VALUES(Calendario[NombresSemanasGráficos])="S-11-15",
CALCULATE(
AVERAGEX(SUMMARIZE(Calendario, Calendario[Semana consecutiva], "Avg", [Suscripciones nuevas]), [Suscripciones nuevas]),
Calendario[ControlSemana]<=-11 && Calendario[ControlSemana]>=-15
),
[Suscripciones nuevas]
)
)
And this is how it's working fine on a line chart with correct values for AVG and SUM:
But when I try to use it on a table so the customcolumn NombresSemanasGráficos are the columns and the measure the values (same as the line chart) it shows the following error:
What I'm missing here?
If you need anything I can upload a sample .pbix and translate it if needed.
Thank you!!
Solved! Go to Solution.
@Anonymous - A sample PBIX would be helpful. That said, my first suspicion is your use of VALUES, try replacing with MAX maybe.
Thank you @Greg_Deckler !! MAX instead of VALUES worked for me.
I don't think the measure I made is the best way to get the desired result but it works so I can't complain.
Thanks!
@Anonymous - A sample PBIX would be helpful. That said, my first suspicion is your use of VALUES, try replacing with MAX maybe.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |