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.
Hai All I need help on this
Requirement: Want to create a pie chart
1 by default it should show max month otherwise it should show selected month v/s category column(column consist of different categorical values.
So I created a measure for this but that is showing an error.
This is the Measure I created but while applying
I am getting this kind of error, please help me to rectify this
Solved! Go to Solution.
Please try
CM =
VAR MaxMonth =
CALCULATE ( MAX ( Initiative[Year Month] ), REMOVEFILTERS ( 'Calendar' ) )
VAR SelectedMonth =
SELECTEDVALUE ( 'Calendar'[Year Month] )
VAR FinalMonth =
IF ( [Is Year Filtered] = TRUE (), MaxMonth, SelectedMonth )
RETURN
CALCULATE ( [# Model Number], 'Calendar'[Year Month] = FinalMonth )
Please try
CM =
VAR MaxMonth =
CALCULATE ( MAX ( Initiative[Year Month] ), REMOVEFILTERS ( 'Calendar' ) )
VAR SelectedMonth =
SELECTEDVALUE ( 'Calendar'[Year Month] )
VAR FinalMonth =
IF ( [Is Year Filtered] = TRUE (), MaxMonth, SelectedMonth )
RETURN
CALCULATE ( [# Model Number], 'Calendar'[Year Month] = FinalMonth )
Hi,
May I ask and please check how is the column 'Initiative'[Year Month] look like? Is it looking like the same as 'Calendar[Year Month Name] ?
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hai @Jihwan_Kim Above image from the calendar table and below image from the initiative table
Please give a solution to rectify
Hi,
The Data type of _finalyear is alphanumeric (I assume) whereas the data type of Year_month is numeric. that is reason fo the error.
Hi,
Do not create Year Month number and Year Month name columns. Create 3 seperate columns - Year, Month name and Month number.
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 |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |