Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I'm new to Power BI and I'm struggeling with my first visual/report.
I have a table 'Carts' like this:
OrderId | Date |
0 | 8-11-2016 14:23:45 |
0 | 8-11-2016 14:23:45 |
1234 | 8-11-2016 14:23:45 |
5678 | 7-11-2016 14:23:45 |
0 | 7-11-2016 14:23:45 |
4521 | 7-11-2016 14:23:45 |
7896 | 7-11-2016 14:23:45 |
0 | 7-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?
Solved! Go to Solution.
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)
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)
User | Count |
---|---|
100 | |
87 | |
81 | |
76 | |
71 |
User | Count |
---|---|
113 | |
104 | |
100 | |
73 | |
65 |