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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
pstanek
Post Patron
Post Patron

Dax

Problem 1

Name 1 Number 1

.

.

Name n  Number n.

 

How can I calculate column with values Number i / Count( Name i).

 

Problem 2

How can I calculate number of blank values.

When I transform column TEXT to TEXT-Count, I will get blank value for blank values.

4 REPLIES 4
v-caliao-msft
Microsoft Employee
Microsoft Employee

Hi Pstnaek,

 

You can add a calculated column to get the count number for each Name
Count = CALCULATE(COUNT(CountValue[Number]),ALLEXCEPT(CountValue,CountValue[Name]))
And then get the value Number i / Count( Name i)
Number/Count = CountValue[Number]/CountValue[Count]

To count blank value, you can use COUNTBLANK function
CountBlank = COUNTBLANK(CountValue[Number])

Capture.PNG

 

Regards,

Charlie Liao

Countblank does not work within DirectQuery, that is the problem

pstanek
Post Patron
Post Patron

add Problem 1 columns are from related tables

I tried this

column = table1[number]/table2[pocet]

 

Pocet=COUNTAX(table2;table2[name])

, but it says that in direct query Countax can not be used.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.