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 Everyone,
I have a quick doubt please if anyone can help?
I am working on a data provided with ID's, months starting from June'19 to March'20(which will extend till June'20) and category/state(text data) of id. I want to look for ID's that have not changed their state from last 3 months, last 6 months, last 9 months and so on. Can we do that on powerbi?
Solved! Go to Solution.
Updated and attached:
3 Months the Same Column =
VAR __Current = [Category]
VAR __Table = FILTER('FactTable1',[Month] <= EARLIER([Month]) && [Month] >= (EARLIER([Month]) - 90) && [ID] = EARLIER([ID]))
VAR __Check = FILTER(__Table, [Category] <> __Current)
RETURN
IF(ISBLANK(COUNTROWS(__Check)), "Same", "Changed")
Yes, you would generally do that something like:
3 Months the Same Column =
VAR __Current = [Category]
VAR __Table = FILTER('Table',[Month] >= ([Month] - 90))
VAR __Check = FILTER(__Table, [Category] <> __Current)
RETURN
IF(ISBLANK(__Check), "Same", "Changed")
I tried your formula by adding another column in data, but I am getting below error on power bi. Is there anything I am doing wrong
I have attached excel file and PBI for your reference.Excel File (Sample) PBI
Really Thanks for your help! 🙂
OK, sorry, try this:
3 Months the Same Column =
VAR __Current = [Category]
VAR __Table = FILTER('FactTable1',[Month] >= ([Month] - 90) && [ID] = EARLIER([ID]))
VAR __Check = FILTER(__Table, [Category] <> __Current)
RETURN
IF(ISBLANK(COUNTROWS(__Check)), "Same", "Changed")
PBIX is attached:
Thanks for your quick help 🙂
It is working, but its working for account changin for all months rather than just 3 months or 6 months or 9 months. I have attached PBI with data for other months data included and screenshot for your reference
Updated and attached:
3 Months the Same Column =
VAR __Current = [Category]
VAR __Table = FILTER('FactTable1',[Month] <= EARLIER([Month]) && [Month] >= (EARLIER([Month]) - 90) && [ID] = EARLIER([ID]))
VAR __Check = FILTER(__Table, [Category] <> __Current)
RETURN
IF(ISBLANK(COUNTROWS(__Check)), "Same", "Changed")
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 |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
122 | |
112 | |
98 | |
79 | |
72 |