Forum Discussion
Month over Month with multiple text values
- 3 months ago
Hi Lucy01,
Issue is with the table format which you're showing in screenshot.
Your data should look like this:-
| Student | Month | Rating | Theme | | ------- | ---------- | ------------- | ---------- | | Adam | 01/01/2024 | Above Average | Homework | | Adam | 01/01/2024 | Above Average | Classwork | | Adam | 01/01/2024 | Average | Sports | | Adam | 01/01/2024 | Average | Homework | | Adam | 01/01/2024 | Below Average | Attendance | | Adam | 01/01/2024 | Below Average | Classwork |Firstly Select below columns and unpivot them
- Above Average
- Average
- Below Average
Once you do that then use split by delimiter on themes column (to Rows)
Transform → Split Column → By Delimiter
Delimiter = ;
select - Split into Rows
Create a calendar table
Calendar =
CALENDAR(
MIN('Sheet1'[Month]),
MAX('Sheet1'[Month])
)Create relationship between date table and your table
and then create dax for current month previous month and MOM%
Total Count = COUNTROWS('Sheet1')Previous Month Count = CALCULATE( [Total Count], DATEADD('Calendar'[Date], -1, MONTH) )MoM % = VAR CurrentMonth = [Total Count] VAR PreviousMonth = [Previous Month Count] RETURN DIVIDE( CurrentMonth - PreviousMonth, PreviousMonth )Now you can use these in your visuals and you'll get the correct output.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
Hi Lucy01,
Issue is with the table format which you're showing in screenshot.
Your data should look like this:-
| Student | Month | Rating | Theme |
| ------- | ---------- | ------------- | ---------- |
| Adam | 01/01/2024 | Above Average | Homework |
| Adam | 01/01/2024 | Above Average | Classwork |
| Adam | 01/01/2024 | Average | Sports |
| Adam | 01/01/2024 | Average | Homework |
| Adam | 01/01/2024 | Below Average | Attendance |
| Adam | 01/01/2024 | Below Average | Classwork |
Firstly Select below columns and unpivot them
- Above Average
- Average
- Below Average
Once you do that then use split by delimiter on themes column (to Rows)
Transform → Split Column → By Delimiter
Delimiter = ;
select - Split into Rows
Create a calendar table
Calendar =
CALENDAR(
MIN('Sheet1'[Month]),
MAX('Sheet1'[Month])
)
Create relationship between date table and your table
and then create dax for current month previous month and MOM%
Total Count =
COUNTROWS('Sheet1')Previous Month Count =
CALCULATE(
[Total Count],
DATEADD('Calendar'[Date], -1, MONTH)
)MoM % =
VAR CurrentMonth =
[Total Count]
VAR PreviousMonth =
[Previous Month Count]
RETURN
DIVIDE(
CurrentMonth - PreviousMonth,
PreviousMonth
)
Now you can use these in your visuals and you'll get the correct output.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
- Lucy013 months agoHelper I
Thank you but that hasn't worked either. Sorry if it's unclear in my original post, but your instructions on which columns to unpivot are the ones I have already done, and I have followed the steps for the delimiter/split rows as well
- Ashish_Mathur3 months agoSuper User
Hi,
Share data in a format that can be pasted in an MS Excel file. Please also show the expected result.
- grazitti_sapna3 months agoSuper User