Forum Discussion
How to add an indicator
Hello,
I’m trying to set an indicator on a Matrix.
It is composed from a History table that has a column with the name of a site (JV), a month (Month) and a volume (VolumeGo)
So i have one line per month for each site.
I want it to be indicated for the last 2 known months if the volume has increased or not. We can very well say that the last known month is the current month -1
I tried with a calculated column but I can’t manage
Thank you for your help
14 Replies
- Kedar_Pande
Super User
Add Month Offset calculated column:
Month Offset = DATEDIFF(TODAY(), History[Month], MONTH)
Measure for indicator:
Trend Indicator =
VAR CurrentVol = [VolumeGo]
VAR PrevVol =
CALCULATE(
[VolumeGo],
FILTER(History, History[Month Offset] = MAX(History[Month Offset]) + 1)
)
RETURN
IF(CurrentVol > PrevVol, "↑", IF(CurrentVol < PrevVol, "↓", "→")) - FBergamaschi
Super User
Hi FP68,
please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Alternatively, you can share your .pbix via some cloud service and paste the link here. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
- FP68
Helper I
Hi,
The table Historique is:
JV Week Categorie Volume JVIT janv-26 Between 3Y and 90D 3,51E+12 JVFR janv-26 Between 3Y and 10Y 3,19E+12 JVFR janv-26 Between 3Y and 90D 3,18E+12 JVUK janv-26 Between 3Y and 90D 1,65E+12 JVIT janv-26 Between 3Y and 10Y 1,55E+12 HQFR janv-26 Between 3Y and 90D 1,37E+12 JVPL janv-26 Between 3Y and 90D 1,17E+12 JVDE janv-26 Between 3Y and 90D 9,05E+11 JVUK janv-26 Between 3Y and 10Y 8,14E+11 JVIT janv-26 Less than 90D 7,62E+11 JVFR janv-26 Less than 90D 7,42E+11 HQFR janv-26 Between 3Y and 10Y 7,32E+11 JVNL janv-26 Between 3Y and 90D 6,83E+11 JVBE janv-26 Between 3Y and 90D 6,22E+11 JVAU janv-26 Between 3Y and 10Y 5,77E+11 JVFR janv-26 10Y and more 5,26E+11 JVPL janv-26 Between 3Y and 10Y 4,85E+11 HQFR janv-26 10Y and more 3,76E+11 JVBE janv-26 Between 3Y and 10Y 3,76E+11 JVAU janv-26 Between 3Y and 90D 3,47E+11 JVUK janv-26 Less than 90D 2,75E+11 JVDE janv-26 Between 3Y and 10Y 2,71E+11 JVAU janv-26 10Y and more 2,20E+11 ASSU janv-26 Between 3Y and 90D 1,71E+11 JVDE janv-26 Less than 90D 1,69E+11 JVPL janv-26 Less than 90D 1,65E+11 HQFR janv-26 Less than 90D 1,65E+11 JVBE janv-26 Less than 90D 1,60E+11 ASSU janv-26 Between 3Y and 10Y 1,17E+11 JVPL janv-26 10Y and more 1,12E+11 JVNL janv-26 Between 3Y and 10Y 1,03E+11 JVIT janv-26 10Y and more 76996742060 JVAU janv-26 Less than 90D 73581114642 ASSU janv-26 Less than 90D 34920870358 JVNL janv-26 Less than 90D 19587381952 JVPL feb-26 Less than 90D 1,54E+11 HQFR feb-26 Less than 90D 1,45E+11 JVES feb-26 Less than 90D 1,33E+11 ASSU feb-26 Between 3Y and 10Y 1,19E+11 JVPL feb-26 10Y and more 1,12E+11 JVES feb-26 Between 3Y and 90D 1,10E+11 JVNL feb-26 Between 3Y and 10Y 1,09E+11 JVIT feb-26 10Y and more 76996775905 JVAU feb-26 Less than 90D 60576955829 ASSU feb-26 Less than 90D 34737386824 JVUK feb-26 10Y and more 17182813778 JVNL feb-26 Less than 90D 16185336043 JVDE feb-26 10Y and more 11820054632 JVNL feb-26 10Y and more 11818724777 JVBE feb-26 10Y and more 7441209608 JVES feb-26 Between 3Y and 10Y 5955133014 JVES feb-26 10Y and more 18518367 JVFR feb-26 Between 3Y and 90D 3,26E+12 JVFR feb-26 Between 3Y and 10Y 3,24E+12 JVFR feb-26 Less than 90D 6,72E+11 JVFR feb-26 10Y and more 5,26E+11 The matrix:
The result:
-cell in red or green for the last month if upgrade/downgrade
- a colored arrow
I haven't a preference
Thanks- FBergamaschi
Super User
Hi FP68,
how abou this?
File attached
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- FP68
Helper I
Hi FBergamaschi
I'm sorry, I can't open your pbix. I've th emessgae:
Could you store it for an oldest version.
I use :Thanks in advance
- Praful_Potphode
Super User
Hi FP68 ,
Pleas try appoarch suggested by FBergamaschi
if it doesnt work, please try sample pbix attcahed.
Please give kudos or mark it as solution once confirmed.
Thanks and Regards,
Praful
- FP68
Helper I
Thanks for your solution.
The only problem is that we see always the column Volumn Indicator and I just want the last oneRegards
- AnonymousNot applicable
Hi FP68 ,
Thank you Kedar_Pande for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.