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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AuditTest
Frequent Visitor

How to create PowerBI measures to show this in a Card

Capture.PNG

 

Pin 010766.01 (I like the PowerBI Card visual to show these below)

There is a total of 6 Projects in this PIN : 010766.01 (est_seq_global) 

There is a total of 3 projects for Form 44 (from st_seq_type) and 3 projects forPreliminary Estimate (est_seq_type)

Form 44 is currently in PHASE- 2 (From the PhaseCDE) and Preliminary Estimate is currently in PHASE - 3 (PhaseCDE)

I tried several counts measure but can get one but not all. Data is from SQL... Any advise? Thanks

3 REPLIES 3
AuditTest
Frequent Visitor

Something like this I tried a few variations. How do I modify the code to capture the split of occurences of Type Code in 2 separate tasks of Form 44 and Preliminary Estimate?

Current_Phase_PPRM_History =
VAR SelectedValue = SELECTEDVALUE('PPRM_History'[PHASECDE])
VAR CheckboxValues =
    CONCATENATEX(
        VALUES('PPRM_History'[PHASECDE]),
        'PPRM_History'[PHASECDE],
        ", "
    )
RETURN
    FORMAT(COUNT('PPRM_History'[PHASECDE]), "#,##0") & " Projects"
Capture8.PNG
AuditTest
Frequent Visitor

How can I do this if lets say the Pin are the same but there are 2 Form 44 and 2 Preliminary Estimate in the same Type Code Column. See this.. that is the problem I am having.. In any of the column, I want to say for this PIN there are a total of 4 (EST_SEQ_GLOBAL) - represents project and of which 2 are Form 44 and 2 arePreliminary Estimate in 2 seperate visual or even as 1 multi card visual.Capture5.PNG

 

ghoshabhijeet
Solution Supplier
Solution Supplier

@AuditTest Thanks for posting your query.

 

Ideally, for every value (count/sum) that you want to show, would be a measure. For example, to show Count of 6 projects under PIN: 010766.01, you need to write a measure which will count the projects.

Project Count = CALCULATE( COUNT('Table'[ColumnName], Pin = SELECTEDVALUE('Table'[PIN]))

To display the values, you can you Single Card Visual / Multi Card Visual based on your report / dashboard presentation.

Hope this answers your question.

 

** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

Good Luck 👍

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.