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 everybody,
I'm having a little issue with one of my charts and I haven't been able to solve it. I have different databases together, one for each month and I created a measure which calculates how many lines I have in the last month according to the date of the last database.
This is the measure I created, it uses a previous measure that just counts the values.
Current Vacants =
VAR __LastUpdate = MAX('FTE_2019-2020'[Fecha extracción])
VAR __CurrentVacant = CALCULATE([Count Vacant];Calendario[Year]=YEAR(__LastUpdate);Calendario[#Month]=MONTH(__LastUpdate))
RETURN
__CurrentVacant
The measure, in general terms, is working, I use it on a card and shows the proper value, however, when I use it on a chart is showing an extra value from a different month. For example, right now my Card is showing 8, there is a table in which I can see the 8 values detail info, but the chart is showing a total of 9, for some reason is adding one value from a different month.
I selected on of the options in the chart (Other) and then the table showed me the aditional value, is a register from 2020-2 that should not be included in the measure since is not from the last updated month.
If you have any idea on how to correct this or what could be happening I would really appreciate it.
Thank you in advance.
Solved! Go to Solution.
Hi @yfquirogah ,
Accoring to my understanding , you don't want to display value shown below ,right?
You could try this:
Measure =
VAR _max =
CALCULATE ( MAX ( 'FTE_2019-2020'[Fecha extracción] ), ALL ( 'FTE_2019-2020' ) )
RETURN
IF (
YEAR ( MAX ( 'FTE_2019-2020'[Fecha extracción] ) ) = YEAR ( _max )
&& MONTH ( MAX ( 'FTE_2019-2020'[Fecha extracción] ) ) = MONTH ( _max ),
[Current Vacants],
0
)
Then set the following column as X-axis, the final output looks like this:
YearMonth =
YEAR ( [Fecha extracción] ) & "-"
& MONTH ( 'FTE_2019-2020'[Fecha extracción] )
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Eyelyn Qin
Hi @yfquirogah ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.
Best Regards,
Eyelyn Qin
Hi @yfquirogah ,
Accoring to my understanding , you don't want to display value shown below ,right?
You could try this:
Measure =
VAR _max =
CALCULATE ( MAX ( 'FTE_2019-2020'[Fecha extracción] ), ALL ( 'FTE_2019-2020' ) )
RETURN
IF (
YEAR ( MAX ( 'FTE_2019-2020'[Fecha extracción] ) ) = YEAR ( _max )
&& MONTH ( MAX ( 'FTE_2019-2020'[Fecha extracción] ) ) = MONTH ( _max ),
[Current Vacants],
0
)
Then set the following column as X-axis, the final output looks like this:
YearMonth =
YEAR ( [Fecha extracción] ) & "-"
& MONTH ( 'FTE_2019-2020'[Fecha extracción] )
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Eyelyn Qin
Hi @yfquirogah
Can you share the pbix?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
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 |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |