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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Shega
New Member

using filter and divide in a meaure

Hello,

 

just an info, I am new to PBI from a DBA background and working on converting a report that is written on OBIEE. Here is one problem I couldn't solve:

 

fact_tbl.gl * 100/filter(fact_tbl.rc USING (fact_tbl.cust='X'))

 

fact_tbl.gl is float datatype

fact_tbl.rc is float datatype

fact_tbl.cust is char datatype

 

I used the PBI filter but the USING clause part is an issue that I couldn't come up with a good solution. When I tried as below, it is not giving me the correct result. 

 

Custx = divide(calculate(fact_tbl.gl]*100),calculate(fact_tbl[rc]),filter(fact_tbl, fact_tbl[cust] ="X"))

 

2 REPLIES 2
mark_endicott
Super User
Super User

@Shega - Did this work? Please could you mark it as the solution if yes, this helps other users find it. 

mark_endicott
Super User
Super User

@Shega - The DAX below should work for you, with the exception of having to change the table/column names:

 

VAR gl = SUMX(fact_tbl, fact_tbl[gl] * 100)

VAR rc = CALCULATE( SUM(fact_tbl[rc]), KEEPFILTERS( fact_tbl[cust] ="X"))

RETURN
DIVIDE( gl, rc, 0 )

 

If this works, please accept it as the solution. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.