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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gkumar
Frequent Visitor

I want to show few cards on same screen with if condition

VolumeProcessed ByAudited ByWeighted ProcessWeighted Audit
1AjayReena65
4RajanKunal88
1KunalRajan1.51.5
1AjayN/A0.50.5
1ReenaAjay65

 

I want to use 1 slicer named as "User name" to multiple cards. 1st as process by and other as audit by on same page of power Bi , where 1 card should show sum of weighted process and other to show sum of weighted audit and lastly the sum of both process and audit. It was done in tableau using below parameter: 

 

sum(IF [Individual] = [Processed By]
THEN [Weighted Process] END)
+
sum(IF [Individual] = [Audited By]
THEN [Weighted Audit] END)

 

Here they replaced processed by and Audited by with individual. 

6 REPLIES 6
gkumar
Frequent Visitor

I was able to do this by using  "TREATAS" function

gkumar
Frequent Visitor

Thank you so much for the prompt response, I am able to get the sum of processed by, audited by and (processed by plus audited by) on seperate pages . What I am not able to achieve is using only 1 slicer and showing all these 3 cards responding to same slicer on the same page . So, if I can have a slicer by name of individual/User, I can see all three cards responding on that accoringly.

Something like this :

 

gkumar_2-1668696523564.png

Here process is sum of processed by, Audit is sum of Audited by and Total Volume is sum of procesed by plus audited by and all of this is responding to parameter created as individual and used in below formula:

 

sum(IF [Individual] = [Processed By]
THEN [Weighted Process] END)
+
sum(IF [Individual] = [Audited By]
THEN [Weighted Audit] END)

 

 

 

v-yinliw-msft
Community Support
Community Support

Hi @gkumar ,

 

You can try this method:

New two tables as the slicers:

ProcessedBy = SUMMARIZE('Table','Table'[Processed By])
AuditedBy = SUMMARIZE('Table','Table'[Audited By])

 

Then in the data table you need to create three measures like these:

WeightedProcess = CALCULATE(SUM('Table'[Weighted Process]), FILTER('Table', 'Table'[Processed By] = MAX('ProcessedBy'[Processed By])))
WeightedAudited = CALCULATE(SUM('Table'[Weighted Audit]), FILTER('Table','Table'[Audited By] = MAX('AuditedBy'[Audited By])))
WPSUMWA = CALCULATE(SUM('Table'[Weighted Audit]) + SUM('Table'[Weighted Process]), FILTER('Table','Table'[Audited By] = MAX('AuditedBy'[Audited By])))

Then the result is:

vyinliwmsft_0-1668589132981.png

 

vyinliwmsft_1-1668589132986.png

 

 

Hope this helps you. Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

 

In the above case Weighted Volume Sum of processed by and audited by for same user Kunal is not reflecting the actual sum. It should come out as 9.50 where as WPSUMWA is showing as 16.

gkumar_3-1668697626029.png

 

amitchandak
Super User
Super User

@gkumar , You need to have an independent user table

 

Sumx(Table, if( [Processed By] = selectedvalue( [Individual]) , [Weighted Process]  , [Weighted Audit]) )

 

or use userelationship with Active inactive join

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Hello Amit,

 

Thank you for your response. I have seen lots of knowledgeable videos on your channel and getting help in understanding Power BI. I would request you if possible can you can upload a video on this topic as well?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors