The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Good Afternoon (Newbie here)
I'm trying to create a card for my dashboard that shows percentage (% value only) of actions completed on time.
So far I have created a claulated column for the completed on time, however there are blanks that appear in the result as being completed on time which need to be excluded from the count.
I was thinking i might nest the ALLNOBLANK function in the current if statement, but i'm a tad lost in the next steps.
This is the current Dax I have in Power Bi
= IF('Corrective Actions'[Action - Date Due]>=('Corrective Actions'[Action - Date Completed]),"yes",if('Corrective Actions'[Action - Date Due]<=('Corrective Actions'[Action - Date Completed]),"No"))
Any guidace to this would be great as a pie chart with filters is not the ideal visual I'm seeking.
I'd like to contidionally format the percentage card value based on it's value ranges
Thank you in advance
Solved! Go to Solution.
Hi @angem ,
I would suggest that you create measures instead of calculated columns. I created a sample data to help you with your problem, you can try adding the following measures.
Sample data:
Add new measures:
Yes =
VAR TotalActions =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
VAR CompletedTimely =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
'Corrective Actions'[Action - Date Due] >= 'Corrective Actions'[Action - Date Completed],
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
RETURN
DIVIDE ( CompletedTimely, TotalActions )
No =
VAR TotalActions =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
VAR CompletedUntimely =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
'Corrective Actions'[Action - Date Due] <= 'Corrective Actions'[Action - Date Completed],
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
RETURN
DIVIDE ( CompletedUntimely, TotalActions )
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Very much appreciate your guidance here Ada, thank you!! What a great way to start the week, your DAX solved my questions above.
Regards
Ange
Hi @angem ,
I would suggest that you create measures instead of calculated columns. I created a sample data to help you with your problem, you can try adding the following measures.
Sample data:
Add new measures:
Yes =
VAR TotalActions =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
VAR CompletedTimely =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
'Corrective Actions'[Action - Date Due] >= 'Corrective Actions'[Action - Date Completed],
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
RETURN
DIVIDE ( CompletedTimely, TotalActions )
No =
VAR TotalActions =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
VAR CompletedUntimely =
CALCULATE (
COUNTROWS ( 'Corrective Actions' ),
'Corrective Actions'[Action - Date Due] <= 'Corrective Actions'[Action - Date Completed],
NOT ( ISBLANK ( 'Corrective Actions'[Action - Date Completed] ) )
)
RETURN
DIVIDE ( CompletedUntimely, TotalActions )
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |