Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Find the number of regulatory ID occurrences in the new summary table

Hello Expert

I have a requlatory identification table with thousands of rows of data, I want to create a summary table and link the new summary table to the Regulatroy FACT problem via Reg ID. With the most recent date in the date column.

See image below

Reciepts.JPG

1 ACCEPTED SOLUTION
YukiK
Impactful Individual
Impactful Individual

Gotcha. This article should answer what you're asking to do!

https://radacad.com/grouping-in-power-query-getting-the-last-item-in-each-group

 

Lete me know if this helps!

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
mh2587
Super User
Super User

Number Consecutive Days =
VAR selecteddate =
SELECTEDVALUE ( 'Table'[Date] )
VAR lastnotworkeddate =
CALCULATE (
MAXX (
FILTER ( Date, ISBLANK ( CALCULATE ( COUNTROWS ( 'Regulatory Issue ID' ) ) ) ),
Table[Date]
),
Table[Date] < selecteddate
)
VAR diff =
DATEDIFF ( lastnotworkeddate, selecteddate, DAY )
RETURN
IF ( COUNTROWS ( 'Regulatory Issue ID' ) > 0, IF ( diff > 1, diff ) )

 

 

Try this one hope it will solve the issue 


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



YukiK
Impactful Individual
Impactful Individual

Are you looking to keep the last row of each regulatory issue ID? I'd do this in Power Query than in DAX...

 

You can select a column and use "keep rows" to keep only the last row:

YukiK_0-1634826169493.png

 

If this helps, please give it a thums up and select as a solution 🙂

Anonymous
Not applicable

Hi I am looking to keep only the last date but - how do you count the number of time/occurance that same regulatory id has re-occurred.

YukiK
Impactful Individual
Impactful Individual

Gotcha. This article should answer what you're asking to do!

https://radacad.com/grouping-in-power-query-getting-the-last-item-in-each-group

 

Lete me know if this helps!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.