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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
NISHA_S
Resolver I
Resolver I

MAx value for a column

i have fact table with lots of data...I have claim value ,policy number ,policy expiry date , policy date like columns in the table.

i need to take max of claim value where file should be  latest file (have fike_master_ids in file_master tables )

and policy  date >'date' (date should be first day of the date based on the file upload date )..ie..if file is upload on feb ...

policy  date >'2/1/2022' 

and policy expiry date >='date' (date should be last day of the previous month+last year based on the file upload date )..ie..if file is upload on feb ...policy expiry date >='1/31/2021'...Based on these above condition i need to create a report

1)max of claim value....

2)for latest file uploaded....eg:if file is upload on feb

3)policy  date >'2/1/2022' 

4)policy expiry date >='1/31/2021

 

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @NISHA_S 

usually information below is needed, could you provide it? Thanks.

 (1) a sample file, you can replace raw data with bogus data to protect your privacy.

     or provide some sample data that fully covers your issue/question.

(2) give your expected result based on the sample you provide. If calculation formula is involved, please provide it.

Kindly note: Please ensure the data in sample is concise and representative.

Thanks.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@NISHA_S , Try measure like

 


measure =
var _max = maxx(all(Table), Table[upload date])
var _min = eomonth(_max,-12)
return
calculate(maxx(values(Table[policy number]),calculate(sum(Table[Claim Amount]))), filter(Table, Table[policy date] >= _max && Table[policy expiry date] >=_min))

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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