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
Anonymous
Not applicable

5)Perform all in built functions based on a condition for suitable Datatype

I am new to Power BI. I have a below sample table. But in real time I have multiple columns, When I perform some in built aggregate condition for any suitable column, it should do based on a condition i.e. Do only for "Individual". This should be applicable for any function(Sum, Average, Count,Maximum, Minimum, Standard Deviation, variance, median)

 

For E.g. If I do take time and Rate(for Time =5) columns. Now if I chose inbuild function for Rate(Average). It should calculate function based on Col1 value "Individual".  - 41.7333.

 

Col 1RateTime (In Mins)Col 4Col 5
individual44.5537NA
individual40.6537NA
individual40.1537NA
Mean41.7537NA
Range40537NA
RSD5.8537NA
SD2.4537NA
individual55.71037NA
individual52.41037NA
individual52.21037NA
Mean53.41037NA
Range521037NA
RSD3.71037NA
SD2.01037NA
individual61.91537NA
individual58.91537NA
individual58.51537NA
Mean59.81537NA
Range591537NA
RSD3.11537NA
SD1.91537NA
individual69.73037NA
individual67.33037NA
individual67.23037NA
Mean68.13037NA
Range673037NA
RSD2.13037NA
SD1.43037NA
individual73.14537NA
individual72.94537NA
individual71.54537NA
Mean72.54537NA
Range724537NA
RSD1.24537NA
SD0.94537NA
individual76.86037NA
individual74.66037NA
individual74.36037NA
Mean75.26037NA
Range746037NA
RSD1.86037NA
SD1.46037NA

 

 

Thanks in Advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for your reply, I was able to sort it out by filtering the values. Thanks

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Not very clear. Try like

calculate(average(Table[Rate]),table[Col1]="Individual")

calculate(Sum(Table[Rate]),table[Col1]="Individual")

calculate(Min(Table[Rate]),table[Col1]="Individual")

calculate(MAx(Table[Rate]),table[Col1]="Individual")

 

https://docs.microsoft.com/en-us/dax/statistical-functions-dax

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
Anonymous
Not applicable

@amitchandak, Thanks for this info. But if you could see the below screenshot, I want the in-built functions to be performed on a condition. This is because my chart is not going to be static, I am going to include personalise Visual where user can change data at run time, following which if he opts for any different column, the data should be calculate with a condition.

 

arunkumar7_0-1597222259712.png

 

 

Hi @Anonymous ,

 

Like this?

Custom column = Rate colum

v-lionel-msft_0-1597305555983.png

 

Best regards,
Lionel Chen

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

 

Anonymous
Not applicable

Thanks for your reply, I was able to sort it out by filtering the values. Thanks

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.