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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Prabhakaran_Nag
Frequent Visitor

A Table of multiple was supplied where a single values are expected

Hello Everyone, Good evening. I am facing an issue with the Formula or Measure. Need your help to support on requirements which is not met in PowerBI Desktop.

 

Scenario

 

1. Need to define targets based upon the employee details by Locations but system giving an error. Formula which i have used : External Certification Target 10% = IF(VALUES('NGGM Base'[ATC])="ATCP",COUNTA('NGGM Base'[Acc Email Id])*.05,COUNTA('NGGM Base'[Acc Email Id])*.10)

 

If the location set as top filter is ATCP it should pick 5% of HC, i have used above formula it was working in column chart and pie chart but not in table. Given screenshot below

Prabhakaran_Nag_0-1710418525518.png


File in table view looks like this. Kindly advise on prioirty as i have some deliverables tomorrow

Prabhakaran_Nag_1-1710418588641.png

 

 

2 ACCEPTED SOLUTIONS
v-zhouwen-msft
Community Support
Community Support

Hi @Prabhakaran_Nag ,

I tested the dax expression you provided and it gave the same error, I think there is a problem with dax itself, I tried to rewrite the dax expression.

The Table data is shown below:

vzhouwenmsft_0-1710472255056.png

Please follow these steps:
1. Use the following DAX expression to create a measure

Measure = IF(SELECTEDVALUE('NGGM Base'[ATC]) = "ATCP",
COUNTAX(FILTER(ALL('NGGM Base'),'NGGM Base'[ATC]  = "ATCP"),'NGGM Base'[ACC Email Id]) * 0.05,
COUNTAX(FILTER(ALL('NGGM Base'),'NGGM Base'[ATC] = SELECTEDVALUE('NGGM Base'[ATC])),'NGGM Base'[ACC Email Id]) * 0.1)

2. Final output

vzhouwenmsft_1-1710472294851.png

vzhouwenmsft_2-1710472302618.png

Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Prabhakaran_Nag
Frequent Visitor

Thanks Wenbin Zhou, sorry away and didnt respond on time. Yes, it is picking the data but one more scenario appeared not only based on ATC column it also by the sub parameter which is CG. 

Example: Comms & Media Headcount 4244 but the value given for ATC only. Actually it should be 10% of HC i.e., for C&M it should be 424 but overall it shown as 1908 based on "ATCI". it should down drill to other values as 75%. Kindly help on the same.

Prabhakaran_Nag_0-1711013736461.png

 

View solution in original post

2 REPLIES 2
Prabhakaran_Nag
Frequent Visitor

Thanks Wenbin Zhou, sorry away and didnt respond on time. Yes, it is picking the data but one more scenario appeared not only based on ATC column it also by the sub parameter which is CG. 

Example: Comms & Media Headcount 4244 but the value given for ATC only. Actually it should be 10% of HC i.e., for C&M it should be 424 but overall it shown as 1908 based on "ATCI". it should down drill to other values as 75%. Kindly help on the same.

Prabhakaran_Nag_0-1711013736461.png

 

v-zhouwen-msft
Community Support
Community Support

Hi @Prabhakaran_Nag ,

I tested the dax expression you provided and it gave the same error, I think there is a problem with dax itself, I tried to rewrite the dax expression.

The Table data is shown below:

vzhouwenmsft_0-1710472255056.png

Please follow these steps:
1. Use the following DAX expression to create a measure

Measure = IF(SELECTEDVALUE('NGGM Base'[ATC]) = "ATCP",
COUNTAX(FILTER(ALL('NGGM Base'),'NGGM Base'[ATC]  = "ATCP"),'NGGM Base'[ACC Email Id]) * 0.05,
COUNTAX(FILTER(ALL('NGGM Base'),'NGGM Base'[ATC] = SELECTEDVALUE('NGGM Base'[ATC])),'NGGM Base'[ACC Email Id]) * 0.1)

2. Final output

vzhouwenmsft_1-1710472294851.png

vzhouwenmsft_2-1710472302618.png

Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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