March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I'm creating a multilanguage report in Power BI and using "Translation Builder" and "Tabular Editor 3" as a tool for doing this. I can translate measures, tables and so on, but I have not yet found a way to translate the items inside a Calculation group.
Lets say I have a Calculation group called Time Intelligence with this items:
Last month
Last year
Year to date
Year to date Last Year
and so on
Then I use this items as a legend in a visual, so I can compare last month or ytd with last year. How can I translate this items?
Solved! Go to Solution.
1. Yes, RLS would certainly be an option, similar to your example 🙂
You would have to have all users included in the role in the Power BI Service (using an appropriate group).
You could set up a Language table as you've shown, with relationship to the field parameter table which has an appropriate Language column added.
Here's my version:
2. Alternatively, you could use the Preselected Slicer visual to do the same job without RLS.
I've attached my test PBIX in case it's useful for comparison 🙂
Hi again @mariussve1,
Good to hear from you 🙂
I have attached an updated PBIX illustrating how I would handle the two challenges you mentioned.
Note on Group By Columns:
When updating my PBIX, I noted that the "Group By Columns" property of the translated calculation group columns may not have been set correctly (apologies if this was the case in the original PBIX).
In Tabular Editor, 'Time Intelligence'[Time Calc (es)] and 'Time Intelligence'[Time Calc (zh)] should both have Group By Columns set to 'Time Intelligence'[Time Calc (en)].
First challenge
Yes, you can indeed filter a calculation group so that only certain items are included in visuals, at a visual, page, or report level.
As an example, I have applied a report level filter on the English Time Calc column so that Last month, Last year and YoY pct change are the only calculation items selected.
Second challenge
You can certainly create a calculation item that returns YoY % change or similar.
I would write the expression like this. The code from calculation items Selected Period and Last year is restated here to avoid sideways recursion. A similar example is shown in this article:
https://www.sqlbi.com/articles/controlling-format-strings-in-calculation-groups/
VAR SelectedPeriod =
SELECTEDMEASURE ()
VAR LastYear =
CALCULATE (
SELECTEDMEASURE (),
SAMEPERIODLASTYEAR ( 'Date'[Date] )
)
VAR Result =
DIVIDE (
SelectedPeriod - LastYear,
LastYear
)
RETURN
Result
The format string expression is:
"#,0.00%"
Hopefully that is some help. Please post back if needed or if I haven't quite addressed the challenges as you expected 🙂
Regards
Hi again @OwenAuger,
I’ve been working on implementing translations for different languages using RLS but have encountered a couple of challenges. If you’re able to help me, I’d really appreciate it. (Or if there’s anyone else on this forum who can assist).
First challenge: Is it possible to select only certain "Items" from a "Calculation group"?
For example, if I only want to display "Last month" and "Last year," how can I filter this while still retaining the translations?
Second challenge: If I add a new "Item" to display a percentage, for example YoY pct change:
[New value] - [Old value] / [Old value]
And then format it as a percentage: #,0.00%
It doesn’t seem to work as expected, as it only shows the original value ( SELECTEDMEASURE() ).
I hope you can take a look at this with me so I can resolve these challenges and reach the finish line 🙂
Thank you so much in advance!
Hi again @mariussve1,
Good to hear from you 🙂
I have attached an updated PBIX illustrating how I would handle the two challenges you mentioned.
Note on Group By Columns:
When updating my PBIX, I noted that the "Group By Columns" property of the translated calculation group columns may not have been set correctly (apologies if this was the case in the original PBIX).
In Tabular Editor, 'Time Intelligence'[Time Calc (es)] and 'Time Intelligence'[Time Calc (zh)] should both have Group By Columns set to 'Time Intelligence'[Time Calc (en)].
First challenge
Yes, you can indeed filter a calculation group so that only certain items are included in visuals, at a visual, page, or report level.
As an example, I have applied a report level filter on the English Time Calc column so that Last month, Last year and YoY pct change are the only calculation items selected.
Second challenge
You can certainly create a calculation item that returns YoY % change or similar.
I would write the expression like this. The code from calculation items Selected Period and Last year is restated here to avoid sideways recursion. A similar example is shown in this article:
https://www.sqlbi.com/articles/controlling-format-strings-in-calculation-groups/
VAR SelectedPeriod =
SELECTEDMEASURE ()
VAR LastYear =
CALCULATE (
SELECTEDMEASURE (),
SAMEPERIODLASTYEAR ( 'Date'[Date] )
)
VAR Result =
DIVIDE (
SelectedPeriod - LastYear,
LastYear
)
RETURN
Result
The format string expression is:
"#,0.00%"
Hopefully that is some help. Please post back if needed or if I haven't quite addressed the challenges as you expected 🙂
Regards
Hi,
Sorry for the late reply, but thank you so much. This worked 100%. It was the ‘group by’ that caused all the trouble, but now it works exactly as desired!
Absolutely great 👌😃
1. Yes, RLS would certainly be an option, similar to your example 🙂
You would have to have all users included in the role in the Power BI Service (using an appropriate group).
You could set up a Language table as you've shown, with relationship to the field parameter table which has an appropriate Language column added.
Here's my version:
2. Alternatively, you could use the Preselected Slicer visual to do the same job without RLS.
I've attached my test PBIX in case it's useful for comparison 🙂
Hi again,
I see you mention that I cannot hide the "Preselected Slicer visual"? Is there any reason why I can't do that?
But I think RLS is a better choice, then I dont need to have this slicer in every report. Im using embedded version of Power BI, so I only have one appuser to put into rls role 🙂
Hi again @mariussve1
It sounds like RLS would work well for you then! 🙂
Regarding the Preselected Slicer visual, what I meant was, if it is truly hidden using the selection pane, it functions unreliably (unlike the core slicer visuals). Specifically, I have found that it briefly works when first hidden, then doesn't filter as expected after a few interactions with the report (at least in Power BI Desktop).
Regards,
Owen
Hi @mariussve1
Since the names of Calculation Items are values in a column, I would suggest following these steps:
I could create a small example to demonstrate when I have a chance (if that's useful), otherwise did you have a sample PBIX you could share?
Regards
Hello @OwenAuger,
And thank you so much for your quick reply. I did actually follow this:
https://owenaugerbi.com/creating-alias-columns-for-calculation-groups/
Looks like its the same concept. But, how can I be able to show the correct language using USERCULTURE() so the endusers dont need to choose the correct language?
Do I need to setup this in RLS on the table so it automaticly filters? Or is it something else and better that Im missing.
I truly appreciate the help, thank you so, so much!!
Looks like RLS could solve this, but maybe something else is better?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |