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.
I have data that gets updated monthly, but not all the names in the rows are updated each month so I need to create a new table with three columns (Name, Date, All … so the same name only appears once in the rows) to pull the latest data, ie. If date = 01 January 2023 return value in ALL in new table, else
if date = 01 December 2022 return ALL value in new table and so on, ie. Babylon last submitted data on 01 April 2021, return name, date and ALL value in new table, Enfield last submitted data on 01 January 2023, return data in new table … can anyone help with this please?
Solved! Go to Solution.
Hi , @Sarah-Barlow
According to your description, you want to get a table that has the only one [PCN_Name] and the only one max of [Effective_Snapshot_Date]. And the corresponding [ALL] value.
Here are the steps you can refer to :
(1)This is my test data:
(2)We can click "New Table" and enter this:
Table 2 = ADDCOLUMNS( SUMMARIZE('Table','Table'[PCN_Name] , "Effective_Snapshot_Date" ,CALCULATE( MAX('Table'[Effective_Snapshot_Date]))) , "ALL" , CALCULATE( SUM('Table'[ALL]),TREATAS({[Effective_Snapshot_Date]},'Table'[Effective_Snapshot_Date]),TREATAS({[PCN_Name]},'Table'[PCN_Name])))
(3)Then we can meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Sarah-Barlow
According to your description, you want to get a table that has the only one [PCN_Name] and the only one max of [Effective_Snapshot_Date]. And the corresponding [ALL] value.
Here are the steps you can refer to :
(1)This is my test data:
(2)We can click "New Table" and enter this:
Table 2 = ADDCOLUMNS( SUMMARIZE('Table','Table'[PCN_Name] , "Effective_Snapshot_Date" ,CALCULATE( MAX('Table'[Effective_Snapshot_Date]))) , "ALL" , CALCULATE( SUM('Table'[ALL]),TREATAS({[Effective_Snapshot_Date]},'Table'[Effective_Snapshot_Date]),TREATAS({[PCN_Name]},'Table'[PCN_Name])))
(3)Then we can meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you!
Hi, I'm new to the forum but I'll try to help you.
I don't know if I understand your query correctly.
You have that table that you show and what you want is to create another one from that if for example the date is > 01/01/2023?
You can do that with the CALCULATETABLE(nombre_tabla, nombre_tabla(date) function > 01/01/2023 )
I hope it serves you, greetings!
Hi, thank you for your reply. What I want is all PCN Names who updated their 'ALL' List in Jan 2023 combined with the PCN Names who last updated in say, December 2022 or November 2022, but not in January 2023 … hope that makes sense? Basically, I want to see the last update value
So it would be something like that?
A table containing the PCN names ONLY from the last update?
If NCPs do not repeat (i.e. a PCN name always refers to the same), I would do the following.
SUMMARIZE(nombre_tabla,
PCN_name,
"PCN_ultimo", MAX(date)
)
See if such a solution works for you.
What I need is a table that would look something like this (No repeated PCN Names, just the last update received):
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |