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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
superroy
Frequent Visitor

Conditional percentage of total a day

Hi,

 

I'm new to Power BI and I'm struggeling with my first visual/report.

I have a table 'Carts' like this:

 

OrderIdDate
08-11-2016 14:23:45
08-11-2016 14:23:45
12348-11-2016 14:23:45
56787-11-2016 14:23:45
07-11-2016 14:23:45
45217-11-2016 14:23:45
78967-11-2016 14:23:45
07-11-2016 14:23:45

 

Now I want a visual of the daily percentage with OrderId <> 0

 

8-11    33.33%

7-11    60.00%

 

How do I do this?

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

@superroy

 

You can achieve this with COUNT functions. OrderID field data type must be Text for this solution to work

 

Create below 3 measures to achieve the desired results.

 

Step1:

TotalRows:= COUNTROWS(Table1)           This will count all the rows in the table.

 

Step2: 

Allrows Greater than Zero:=CALCULATE(COUNTA(Table1[OrderId]),Table1[OrderId]>"0")

 

Step 3:

Dailypercentage:=DIVIDE([Allrows Greater than Zero],[TotalRows],2)

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

1 REPLY 1
BhaveshPatel
Community Champion
Community Champion

@superroy

 

You can achieve this with COUNT functions. OrderID field data type must be Text for this solution to work

 

Create below 3 measures to achieve the desired results.

 

Step1:

TotalRows:= COUNTROWS(Table1)           This will count all the rows in the table.

 

Step2: 

Allrows Greater than Zero:=CALCULATE(COUNTA(Table1[OrderId]),Table1[OrderId]>"0")

 

Step 3:

Dailypercentage:=DIVIDE([Allrows Greater than Zero],[TotalRows],2)

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.