cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gokul Member
Member

measure to custom column (data to be used in legend )

Hi all,,
I need to turn the data in table into a chart and I cannot use the measure on the legend or axis on chart

Avg = var dayNo=INT(AVERAGE('Group Query'[mins])/1440)
var hourNo=INT(MOD((AVERAGE('Group Query'[mins])),1440)/60)
var minuteNO=MOD(MOD((AVERAGE('Group Query'[mins])),1440),60)
var days=if(dayNo>1,dayNO&" Days ",if(dayNo=1,dayNO&" Day "))
var hrs=if(hourNo,FORMAT(hourNo,"#0")&" Hrs ",if(hourNo=1,FORMAT(hourNo,"#0")&" Hr "))
var mins=if(minuteNO>1,FORMAT(minuteNo,"#0")&" Mins",if(minuteNO=1,FORMAT(minuteNo,"#0")&" Min",if(minuteNO=0,"")))

return CONCATENATE(days,CONCATENATE(hrs,mins))

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: measure to custom column (data to be used in legend )

Hi @Gokul

Create measures

dayNo = INT(AVERAGE('Group Query'[mins])/1440)

hourNo = INT(MOD((AVERAGE('Group Query'[mins])),1440)/60)

minuteNO = MOD(MOD((AVERAGE('Group Query'[mins])),1440),60)

Then create  a column

column = 
var days = if([dayNo]>1,[dayNO]&" Days ",if([dayNo]=1,[dayNO]&" Day ")) var hrs = if([hourNo],FORMAT([hourNo],"#0")&" Hrs ",if([hourNo]=1,FORMAT([hourNo],"#0")&" Hr ")) var mins2 = if([minuteNO]>1,FORMAT([minuteNo],"#0")&" Mins",if([minuteNO]=1,FORMAT([minuteNo],"#0")&" Min",if([minuteNO]=0,""))) Return CONCATENATE(days,CONCATENATE(hrs,mins2))

5.png

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
Gokul Member
Member

convert measure into custom column

 I need to turn the data in table into a chart and I cannot use the measure on the legend or axis on chart

My Measure:
AvgTurnaroundTime= var dayNo=INT(AVERAGE('Group Query'[_mins])/1440)
var hourNo=INT(MOD((AVERAGE('Group Query'[mins])),1440)/60)
var minuteNO=MOD(MOD((AVERAGE('Group Query'[mins])),1440),60)
var days=if(dayNo>1,dayNO&" Days ",if(dayNo=1,dayNO&" Day "))
var hrs=if(hourNo,FORMAT(hourNo,"#0")&" Hrs ",if(hourNo=1,FORMAT(hourNo,"#0")&" Hr "))
var mins=if(minuteNO>1,FORMAT(minuteNo,"#0")&" Mins",if(minuteNO=1,FORMAT(minuteNo,"#0")&" Min",if(minuteNO=0,"")))

return CONCATENATE(days,CONCATENATE(hrs,mins))

Community Support Team
Community Support Team

Re: measure to custom column (data to be used in legend )

Hi @Gokul

Create measures

dayNo = INT(AVERAGE('Group Query'[mins])/1440)

hourNo = INT(MOD((AVERAGE('Group Query'[mins])),1440)/60)

minuteNO = MOD(MOD((AVERAGE('Group Query'[mins])),1440),60)

Then create  a column

column = 
var days = if([dayNo]>1,[dayNO]&" Days ",if([dayNo]=1,[dayNO]&" Day ")) var hrs = if([hourNo],FORMAT([hourNo],"#0")&" Hrs ",if([hourNo]=1,FORMAT([hourNo],"#0")&" Hr ")) var mins2 = if([minuteNO]>1,FORMAT([minuteNo],"#0")&" Mins",if([minuteNO]=1,FORMAT([minuteNo],"#0")&" Min",if([minuteNO]=0,""))) Return CONCATENATE(days,CONCATENATE(hrs,mins2))

5.png

 

Best Regards

Maggie

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)