The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm working on a PowerBI report and one of the DAX is not working as expected. I use various filters in the page and at a particular scenario the ALL function is not working as expected.
For example I use below filters
1. MainStarTable[OID]
2. MainStarTable[FID]
3. MainStarTable[LengtOFstay]
4. MainStarTable[DateRange]
When using only FID and OID filters all the below DAX is returing the expected results. But when I use all the filters combined DAX3 and DAX2 is not working as expected
DAX1 =ageGroup= CALCULATE(sum(DM_AgeGrouping[validRecordbit]))
DAX2 =NageGroup= CALCULATE(sum(DM_AgeGrouping[validRecordbit]),ALL(MainStarTable[OID]))
DAX3 =OageGroup=CALCULATE(sum(DM_AgeGrouping[validRecordbit]),ALL(MainStarTable[FID],MainStarTable[OID])
Problem is with DAX3 and DAX2. For some reason DAX3/DAX2 is not utilizing the function ALL(MainStarTable[FID],MainStarTable[OID])
If anyone have any suggestion, please let me know. Thanks
@Anonymous , these seems correct. Are facing value issue or some error
DAX2 =NageGroup= CALCULATE(sum(DM_AgeGrouping[validRecordbit]),ALL(MainStarTable[OID]))
Means other then OID view in table, you should see filter on OID is removed. For the OID group by/view you will see total value without filter with selected value.
refer
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
@amitchandak Yes I know how this works. Problem is I'm missing some values in the OID columns which is not suppose to happen when OID filters are used. Again use the below link to download the sample file.
https://www.dropbox.com/s/s0xkou30i1g1keg/TestFile.pbix?dl=0
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |