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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
EdipGashi
Frequent Visitor

Can someone help me, why when I put the Category, the results are losing me

Dear all,

I did one calculation to show what I need, Results in 4 previous quarters but now when I bring a category it disappears although the relationship is fine and works properly.
If I put the same category in the Filter pane, it works well.
Can someone know where the problem should be?

These are the calculations that I did:

This is for the count:
*Total Number = if(NOT isinscope(Results[Result (+/-)]) && HASONEVALUE(Results[Result (+/-)]), BLANK(), COUNTROWS(TimestampExportReport) )

I did a table for only Years and Quarters.
1.png

 

After that, I did this calculation where I put as a filter on the filter pane and everything is good till now:

Flag =
var _max=SELECTEDVALUE(ForSlicer[YearQuarter])
var _min=CALCULATE(MAX(‘ForSlicer’[YearQuarter]),FILTER(ALL(‘ForSlicer’),‘ForSlicer’[Index]=SELECTEDVALUE(ForSlicer[Index])-3))
VAR _yearQuarter =
MAX ( ‘Calendar’[Years] ) * 100
+ MAX (‘Calendar’[Qtr])
return IF(_yearQuarter<=_max &&_yearQuarter>=_min,1,0)

As I said when I put the Category, it disappears the result.

I did this video where you can see it.




Regards



2 REPLIES 2
amitchandak
Super User
Super User

@EdipGashi , Assume the total number is a measure, In place of the Flag filter use this measure

Create a column in ForSlicer and calendar 

 

Qtr Rank= rankx('ForSlicer',[YearQuarter], ,asc,dense)

 

//ForSlicer is independent table, calendar   is joined with Table
new measure =
var _max = maxx(allselected(ForSlicer),ForSlicer[Qtr Rank])
var _min = _max -3
return
calculate( [total number], filter('Date', 'calendar '[YearQuarter] >=_min && 'calendar '[YearQuarter] <=_max))

Thank you @amitchandak ,

I think that the problem is somewhere else because if I put Quarters in ROWS and Category in COLUMNS, they are displayed very well, but Quarters in Columns and Category in Rows are not displayed.
I have never encountered this problem and I don't know if it has to do with calculations, those that I wroted above, or somewhere else.

Thank you in advance

See the video:

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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