Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
In a powerPivot table. "CompletContratrem"
I have a "Brut" column, decimal number format.
And a measure "fx_Brut":=Sum([Brut])
and another "Année" column, Text format
example
nom | Brut | Année | |
Titi | 1125,45 | 2020 | |
Toto | 3456,87 | 2021 | |
Tata | 3456,21 | 2020 | |
tete | 1765,12 | 2021 |
I would like the "Brut" total if "Année" = 2020,
I tried several solutions, but it stuck
I have already calculated a measure to get 2020 (the smallest year in the Year column)
Regul_N_1:=calculate(value(max(CompletContratrem[Année]))-1)
i get good 2020
But,
even though I converted the "Année" column to integer, the metric "fx_Brut_N_1"
fx_Brut_N_1:=calculate([fx_Brut];filter(CompletContratrem;CompletContratrem[Année] =[Regul_N_1]))
, returns me (empty)
If I leave the Year column as text, and I adapt the measure by converting Année with Value
fx_Brut_N_1:=calculate([fx_Brut];filter(CompletContratrem;Value(CompletContratrem[Année] )=[Regul_N_1]))
, I also have a value return (empty)
On the other hand, if I modify the measure and set a hard comparison criterion ex: 2020, it works.
fx_Brut_N_1:=calculate([fx_Brut];filter(CompletContratrem;Value(CompletContratrem[Année] )=2020))
, returns the correct value
but,
fx_Brut_N_1:=calculate([fx_Brut];filter(CompletContratrem;Value(CompletContratrem[Année] )=value([Regul_N_1])))
Always returns (empty)
I don't understand, I need explanations and help.
Thank for your help
Philippe
Solved! Go to Solution.
Thank a lot,
i will read the article on context transition that i don't know.
philippe
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |