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,
Seeking guidance on how to do this ?
Requirement : if one of the id has repeated in any of the months ,then it should not be considered again for any other month count
Lets say customer visits shop in month of jan ,same customer visits in the feb month also,but when we plot graph for month wise customer count,ideally for feb it should show count which is exclusion of customers apppeared in jan
So graph needed is - Bar chart(axis-month and bars - count of ids)
For refrence - please find the attached file,
in original source file there are many tables related,so please help me on dax formula.asap
Solved! Go to Solution.
Hi @Anonymous ,
You need to create a new column to turn the month into a number.
MonthNum = SWITCH ( test[Month], "Jan", 1, "Feb", 2, "Mar", 3, "Apr", 4, "May", 5, "Jun", 6, "Jul", 7, "Aug", 8, "Sep", 9, "Oct", 10, "Nov", 11, "Dec", 12 )
Then create a new column to display first occurrence.
Column = VAR a = CALCULATE ( COUNTROWS ( test ), ALLEXCEPT ( test, test[ID] ) ) RETURN IF ( a = 2, CALCULATE ( FIRSTNONBLANK ( test[ID], 1 ), FILTER ( test, test[ID] = EARLIER ( test[ID] ) && test[MonthNum] = EARLIER ( test[MonthNum] ) + 1 ) ), test[ID] )
Now you can get the visual.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You need to create a new column to turn the month into a number.
MonthNum = SWITCH ( test[Month], "Jan", 1, "Feb", 2, "Mar", 3, "Apr", 4, "May", 5, "Jun", 6, "Jul", 7, "Aug", 8, "Sep", 9, "Oct", 10, "Nov", 11, "Dec", 12 )
Then create a new column to display first occurrence.
Column = VAR a = CALCULATE ( COUNTROWS ( test ), ALLEXCEPT ( test, test[ID] ) ) RETURN IF ( a = 2, CALCULATE ( FIRSTNONBLANK ( test[ID], 1 ), FILTER ( test, test[ID] = EARLIER ( test[ID] ) && test[MonthNum] = EARLIER ( test[MonthNum] ) + 1 ) ), test[ID] )
Now you can get the visual.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |