cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samcaicn Frequent Visitor
Frequent Visitor

Percentage of total

Hello

in a column:

 

I would like to calculate bigger than 1.9 values rows as a percentage of total rows.

 

What is the measure I have to apply?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Phil_Seamark Super Contributor
Super Contributor

Re: Percentage of total

Can you please provide some sample data


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Phil_Seamark Super Contributor
Super Contributor

Re: Percentage of total

Hi @samcaicn

 

New Measure = 
	DIVIDE(
		CALCULATE(
			COUNTROWS('OUT_ACTIVE'),
			'OUT_ACTIVE'[ACTIVE]>1.9
			)
			, 
			CALCULATE(COUNTROWS('OUT_ACTIVE')
			)
		)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

8 REPLIES 8
samcaicn Frequent Visitor
Frequent Visitor

Re: Percentage of total

i try:

 

DIVIDE(COUNTROWS(OUT_ACTIVE[ACTIVE],OUT_ACTIVE[度量值]>1),ALL(OUT_ACTIVE[ACTIVE]))

 

 

doesnot work!

 

 

 

 

creat new colum= (FILTER(OUT_ACTIVE[ACTIVE]),VALUES(OUT_ACTIVE[ACTIVE])>1.9)

 

also doesnot work!

Phil_Seamark Super Contributor
Super Contributor

Re: Percentage of total

Have you tried creating it as a Measure?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

samcaicn Frequent Visitor
Frequent Visitor

Re: Percentage of total

Thanks for ur reply so much,

 

may u give out the writting?

 

Thanks

Phil_Seamark Super Contributor
Super Contributor

Re: Percentage of total

Can you please provide some sample data


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

samcaicn Frequent Visitor
Frequent Visitor

Re: Percentage of total

ACTIVE

1.986356146
1.808821736
1.808821736
1.808821736
1.810247903
1.808821736
1.808821736
1.808821736
0
1.930190799
1.808821736
1.810247903
1.810247903
 
1.871044056
1.808821736
1.844600473
1.810247903
1.808821736
0
1.808821736
1.812897039
1.847597763
1.808821736
0
1.808821736
1.808821736
 

 

i tried creat measure,but COUNTX can't use with >1.9

 

so,ps help

Phil_Seamark Super Contributor
Super Contributor

Re: Percentage of total

Hi @samcaicn

 

New Measure = 
	DIVIDE(
		CALCULATE(
			COUNTROWS('OUT_ACTIVE'),
			'OUT_ACTIVE'[ACTIVE]>1.9
			)
			, 
			CALCULATE(COUNTROWS('OUT_ACTIVE')
			)
		)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

samcaicn Frequent Visitor
Frequent Visitor

Re: Percentage of total

Thanks so much  big boss!

 

may u give out another way by creating column like this: FILTER('OUT_ACTIVE'[ACTIVE]>1.9,OUT_ACTIVE[ACTIVE]) ?

 

so i can draw it out with a circle map.

Phil_Seamark Super Contributor
Super Contributor

Re: Percentage of total

If you'd like the data to be in a new column you could always try

 

New Column = IF(
            ---- CONDITION ----
            'OUT_ACTIVE'[ACTIVE] > 1.9,
            ---- THEN ----
            'OUT_ACTIVE'[ACTIVE],
            ---- ELSE ----
            BLANK()
            )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!