Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
i have a table where i need to compare values from 2 months using slicer, at this moment im using this measure:
Total LM = CALCULATE([nStudents];PREVIOUSMONTH('Month'[Data]) ) when i try to use this measure i dont get any result.
Sample Data
Data ClassName nStudents Total LM
01/01/2018 ClassA 30
01/02/2018 ClassA 25 -5
My Month[Data] its already set as data table if it helps.
At my relationship i have
My class table as * to 1 for Month table.
My class table has IdMonth .
Rui Silva
Solved! Go to Solution.
@Greg_Deckler Thanks for all the help,
I managed to get solution using a invoked table with dates from 01/01/2018 to 31/12/2018 and its working as i would understand everytime i need to compares dates i cant uses tables i used from myself and need to create a invoked table with dates , etc
Thanks !
Rui Silva
So, the sample data you presented, is that what you want to display as far as the Total LM, but you are not getting that result?
OK, so is the sample data presented (other than Total LM) represent your source data or are there some calculations going on there? So do you have 1 row for each month in your source data?
@Greg_Deckler So in my source data i have for each class 4 rows with diferent data and month as for example:
IDMonth IDClass ClassName nStudents
1 CA ClassA 30
1 CB ClassB 30
2 CA ClassA 25
2 CB ClassB 25
3 CA ClassA 25
3 CB ClassB 20
4 CA ClassA 25
4 CB ClassB 19
This is my source data the only calculation i had was the total os nStudents, and when i try to compare the months each others when i put the measure in the table the result dont appear, Also i have Month table as Source
IDMonth MonthName Date
1 January 01/01/2018
2 February 01/02/2018
3 March 01/03/2018
4 April 01/04/2018
My date column is formated to be the data table so i could compare the months.
OK, so since you do not have a true Date column, you are probably going to run into issues with the standard time intelligence functions. Check out my Time Intelligence "The Hard Way" Quick Measure here:
@Greg_Deckler First of all Thanks for the assistance,
About true Date Column what u mean with that ?
Its is a column made with Dax / Power Query ?
@Greg_Deckler Thanks for all the help,
I managed to get solution using a invoked table with dates from 01/01/2018 to 31/12/2018 and its working as i would understand everytime i need to compares dates i cant uses tables i used from myself and need to create a invoked table with dates , etc
Thanks !
Rui Silva
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 |
---|---|
109 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |