Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have data as follows:
ID | CATEGORY | SUB-CATEGORY | SALES | TARGET |
1 | A | AA | 100 | 150 |
2 | B | BB | 200 | 200 |
3 | C | CC | 300 | 200 |
4 | A | AB | 400 | 300 |
5 | B | BC | 500 | 400 |
6 | C | CA | 100 | 150 |
7 | A | CC | 200 | 150 |
8 | B | BB | 300 | 300 |
9 | C | AA | 400 | 500 |
I need to count the ID having Divide(Sales,Target) > 100%, in above case the count is 4.
Please help me to do it.
Thanks,
AshDil.
Solved! Go to Solution.
Maybe something like this?
SUMX (
VALUES ( dimID[ID] ),
IF (
CALCULATE ( SUM ( Sales[Sales ) ) > CALCULATE ( SUM ( Target[Target] ) ),
1
)
)
It's hard to say exactly without seeing your model.
Hello Dear,
If the data is the same as you uploaded it, you must occupy this DAX
Divide =
COUNTROWS(
FILTER('Table (3)',
( 'Table (3)'[Ventas] / 'Table (3)'[Blanco] ) > 1 )
)
How about counting rows where Sales > Target?
COUNTROWS ( FILTER ( Table1, Table1[Sales] > Table[Target] ) )
Hi @AlexisOlson & @Syndicate_Admin ,
If Sales & Target present in different fact tables then how to do it. The both fact tables are connected to calendar table and common column between two fact tables is ID.
Please help me to do it.
Thanks,
AshDil.
Maybe something like this?
SUMX (
VALUES ( dimID[ID] ),
IF (
CALCULATE ( SUM ( Sales[Sales ) ) > CALCULATE ( SUM ( Target[Target] ) ),
1
)
)
It's hard to say exactly without seeing your model.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
115 | |
74 | |
57 | |
47 | |
38 |
User | Count |
---|---|
167 | |
117 | |
61 | |
58 | |
46 |