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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

RuleName combination

Rule Combination.PNG

5 REPLIES 5
nandukrishnavs
Community Champion
Community Champion

@Anonymous 

 

You have to add a column "Group" to identify the group.

Refer the below example.

Sample Table. 

RuleNameTotal RecordsTotal Record PassedGroup
A100501
B2001501
C230752
D502302
E150503
F751503

 

Calculated Table

 

Table 2 =
CALCULATETABLE (
    SUMMARIZE (
        'TestData',
        TestData[Group],
        "Rule Name", CONCATENATEX (
            DISTINCT ( TestData[RuleName] ),
            TestData[RuleName],
            ","
        ),
        "Total Record", SUM ( TestData[Total Records] ),
        "Total Record Passed", SUM ( TestData[Total Record Passed] )
    )
)

 

Capture.JPG



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Anonymous
Not applicable

any suggestion as an SQL query 

Anonymous
Not applicable

Hi @Anonymous ,

For SQL Query, you can try to write it like this:

select case when RuleName in ('A','B') then 'AB' when RuleName in ('C','D','E') then 'CDE' when RuleName in ('F','G') then 'FG' end as RuleName,
sum([Total Records])"Total Records", sum([Total Records Passed]) "Total Records Passed",sum([Total Records Failed]) "Total Records Failed",
cast(cast(100 *(sum([Total Records Passed])/sum([Total Records])  )as decimal(18,1) ) as varchar(50))+'%' "Pass%",
cast(cast(100 *(sum([Total Records Failed])/sum([Total Records])  )as decimal(18,1) ) as varchar(50))+'%' "Fail%"
from Rules
group by 
case when RuleName in ('A','B') then 'AB' when RuleName in ('C','D','E') then 'CDE' when RuleName in ('F','G') then 'FG' end

sql.PNG

Best Regards

Rena

@Anonymous 

 

If it is working, please mark it as a solution.


Regards,
Nandu Krishna

Anonymous
Not applicable

thanks. let me try the solution 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.